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
770
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.1k
Google I/O Extended Tokyo 2018
magiepooh
2
1.5k
APIのデータのマッピングを 約18倍速くした話
magiepooh
2
930
まだAPI定義管理で消耗してるの?〜Swaggerを用いた大規模アプリ時代のAPI定義管理とコードジェネレート〜
magiepooh
38
18k
RootBeer
magiepooh
0
780
Kotlin入門
magiepooh
2
1.7k
Adjust Full Screen
magiepooh
2
470
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
よくわからんサービスについての問い合わせが来たときの強い味方 Amazon Q について
kazzpapa3
0
220
【若手エンジニア応援LT会】AWSで繋がり、共に成長! ~コミュニティ活動と新人教育への挑戦~
kazushi_ohata
0
180
初心者に Vue.js を 教えるには
tsukuha
5
390
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
生成AIとAWS CDKで実現! 自社ブログレビューの効率化
ymae
2
330
わたしとトラックポイント / TrackPoint tips
masahirokawahara
1
240
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
1
500
カメラを用いた店内計測におけるオプトインの仕組みの実現 / ai-optin-camera
cyberagentdevelopers
PRO
1
120
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.6k
Amazon FSx for NetApp ONTAPを利用するにあたっての要件整理と設計のポイント
non97
1
160
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
210
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
170
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Music & Morning Musume
bryan
46
6.1k
Thoughts on Productivity
jonyablonski
67
4.3k
Designing Experiences People Love
moore
138
23k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Designing for humans not robots
tammielis
249
25k
Statistics for Hackers
jakevdp
796
220k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Writing Fast Ruby
sferik
626
61k
4 Signs Your Business is Dying
shpigford
180
21k
How to Think Like a Performance Engineer
csswizardry
19
1.1k
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 ʯʹͳΔΒ͍͠ɻ୭͔ڭ͍͑ͯͩ͘͞