SA DL
SA DL

Reputation: 73

if my app crashes, when I reopen the app, how to know the app just crashed?

I tried to look at crashlytics but did not find any solution, could there be an intent maybe?

Upvotes: 1

Views: 333

Answers (1)

Sambhav Khandelwal
Sambhav Khandelwal

Reputation: 3765

It's not too hard as you just want to know if it crashed. Not anything like why is crashed and other things. You can just use this:

if(FirebaseCrashlytics.getInstance().didCrashOnPreviousExecution())){
   // the app crashed the previous time it was opened. 
} else {
   // the app did not crash the previous time it was opened.
} 

Upvotes: 1

Related Questions