Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Customize Error Message
Search
magiepooh
June 22, 2017
Technology
0
780
Customize Error Message
Customize Error Message for Android
How to catch Uncaught Exception.
magiepooh
June 22, 2017
Tweet
Share
More Decks by magiepooh
See All by magiepooh
今さら角丸のTransition
magiepooh
0
1.2k
Google I/O Extended Tokyo 2018
magiepooh
2
1.5k
APIのデータのマッピングを 約18倍速くした話
magiepooh
2
940
まだAPI定義管理で消耗してるの?〜Swaggerを用いた大規模アプリ時代のAPI定義管理とコードジェネレート〜
magiepooh
38
18k
RootBeer
magiepooh
0
790
Kotlin入門
magiepooh
2
1.7k
Adjust Full Screen
magiepooh
2
480
How to get size of NavigationBar and StatusBar
magiepooh
1
1.6k
How to detect phone call
magiepooh
0
1.6k
Other Decks in Technology
See All in Technology
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.3k
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
16
4.1k
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
150
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
270
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
5
120
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
500
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
560
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
なぜCodeceptJSを選んだか
goataka
0
160
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
810
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
450
Faster Mobile Websites
deanohume
305
30k
Become a Pro
speakerdeck
PRO
26
5k
Typedesign – Prime Four
hannesfritz
40
2.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Facilitating Awesome Meetings
lara
50
6.1k
How to train your dragon (web standard)
notwaldorf
88
5.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Transcript
Customize Error Message @magie_pooh shibuya.apk #16
ࣗݾհ ౻ాୖຏ @magie_pooh @magiepooh
Customize Error Message @magie_pooh shibuya.apk #16
Crash Reporting Tool • Crashlytics • Firebase Crash Reporting •
Play Console
Crash Reporting Tool • Crashlytics • Firebase Crash Reporting •
Play Console
None
͜͜ΛΧελϚΠζ͍ͨ͠
None
None
None
ফ͍ͨ͠
private static Thread.UncaughtExceptionHandler defaultUEH; private static Thread.UncaughtExceptionHandler caughtExceptionHandler = new
Thread.UncaughtExceptionHandler() { @TargetApi(Build.VERSION_CODES.KITKAT) @Override public void uncaughtException(Thread thread, Throwable throwable) { // do something defaultUEH.uncaughtException(thread, throwable); } }; @Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics()); defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(caughtExceptionHandler); } ApplicationΫϥε
private static Thread.UncaughtExceptionHandler defaultUEH; private static Thread.UncaughtExceptionHandler caughtExceptionHandler = new
Thread.UncaughtExceptionHandler() { @TargetApi(Build.VERSION_CODES.KITKAT) @Override public void uncaughtException(Thread thread, Throwable throwable) { // do something defaultUEH.uncaughtException(thread, throwable); } }; @Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics()); defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(caughtExceptionHandler); } ApplicationΫϥε
private static Thread.UncaughtExceptionHandler defaultUEH; private static Thread.UncaughtExceptionHandler caughtExceptionHandler = new
Thread.UncaughtExceptionHandler() { @TargetApi(Build.VERSION_CODES.KITKAT) @Override public void uncaughtException(Thread thread, Throwable throwable) { // do something defaultUEH.uncaughtException(thread, throwable); } }; @Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics()); defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(caughtExceptionHandler); } ApplicationΫϥε
private static Thread.UncaughtExceptionHandler defaultUEH; private static Thread.UncaughtExceptionHandler caughtExceptionHandler = new
Thread.UncaughtExceptionHandler() { @TargetApi(Build.VERSION_CODES.KITKAT) @Override public void uncaughtException(Thread thread, Throwable throwable) { // do something defaultUEH.uncaughtException(thread, throwable); } }; @Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics()); defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(caughtExceptionHandler); } ApplicationΫϥε
private static Thread.UncaughtExceptionHandler defaultUEH; private static Thread.UncaughtExceptionHandler caughtExceptionHandler = new
Thread.UncaughtExceptionHandler() { @TargetApi(Build.VERSION_CODES.KITKAT) @Override public void uncaughtException(Thread thread, Throwable throwable) { // do something defaultUEH.uncaughtException(thread, throwable); } }; @Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics()); defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(caughtExceptionHandler); } ApplicationΫϥε
private static Thread.UncaughtExceptionHandler defaultUEH; private static Thread.UncaughtExceptionHandler caughtExceptionHandler = new
Thread.UncaughtExceptionHandler() { @TargetApi(Build.VERSION_CODES.KITKAT) @Override public void uncaughtException(Thread thread, Throwable throwable) { // do something defaultUEH.uncaughtException(thread, throwable); } }; @Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics()); defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(caughtExceptionHandler); } ApplicationΫϥε
Field field = Throwable.class .getDeclaredField("detailMessage"); field.setAccessible(true); field.set(throwable, ""); ExceptionͷϝοηʔδΛͻͨ͢Βফ͢
ফ͑ͨʂʂʂ
CrashlyticsͷΈ • Fabric.with(this, new Crashlytics());
CrashlyticsͷΈ • Fabric.with(this, new Crashlytics()); • CrashlyticsCore#onPreExecute()Ͱ CrashlyticsControllerΛੜ
CrashlyticsͷΈ • Fabric.with(this, new Crashlytics()); • CrashlyticsCore#onPreExecute()Ͱ CrashlyticsControllerΛੜ • CrashlyticsControllerΫϥεͰ
CrashlyticsUncaughtExceptionHandlerΛੜ
·ͱΊ • UncaughtExceptionHandlerΛ͑ΧελϚΠζͰ͖Δ • ଞͷCrash Reporting ToolະௐࠪͳͷͰɺͲͳ͔ͨڭ͑ ͍ͯͩ͘͞ • Firebase
Crash ReportingͰݸਓใʹؔΘΔ෦ ʮREDACTED_PERSONAL_IDENTIFICATION_NUMBER ʯʹͳΔΒ͍͠ɻ୭͔ڭ͍͑ͯͩ͘͞