my app is getting "force close" randomly. And every time error can not be same. Is there a way to pop up "error message" with that "force close" to determine what is the cause of it. How to I handle "force close" properly?
Appreciate your help.
my app is getting "force close" randomly. And every time error can not be same. Is there a way to pop up "error message" with that "force close" to determine what is the cause of it. How to I handle "force close" properly?
Appreciate your help.
The way you handle "force close" is to -- whenever you get one -- get a logcat dump of your app and find out what went wrong. This is a bug in your app, you must fix it before distributing your app. Use the logcat to get the error that caused your app to crash: you're probably doing something bad in the design of your app if you're getting them in different places.. (I.e., work on the UI thread.) You can also look into ACRA if you want to get them after deployment.
For that you have to use
Thread.setDefaultUncaughtExceptionHandler
Please look at the following link to get more info: