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
君は隠しイベントを見つけれるか?
mujyun
0
290
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
ガバメントクラウド先行事業中間報告を読み解く
sugiim
1
1.4k
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
210
わたしとトラックポイント / TrackPoint tips
masahirokawahara
1
240
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
27
12k
生成AIとAWS CDKで実現! 自社ブログレビューの効率化
ymae
2
330
Vueで Webコンポーネントを作って Reactで使う / 20241030-cloudsign-vuefes_after_night
bengo4com
4
2.5k
大規模データ基盤チームのオンプレTiDB運用への挑戦 / dpu-tidb
cyberagentdevelopers
PRO
1
110
VPC間の接続方法を整理してみた #自治体クラウド勉強会
non97
1
850
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
現地でMeet Upをやる場合の注意点〜反省点を添えて〜
shotashiratori
0
530
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Ruby is Unlike a Banana
tanoku
96
11k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
290
How STYLIGHT went responsive
nonsquared
95
5.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Thoughts on Productivity
jonyablonski
67
4.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.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 ʯʹͳΔΒ͍͠ɻ୭͔ڭ͍͑ͯͩ͘͞