Search code examples
androidquickblox

Regarding the android app crash


Actually my android app is using quickblox backend, If app got crash somewhere then session gets destroyed but app is not getting closed. it just goes to previous activity, but user is not able to do any operation to backend means service call(saying token required).

So I want a solution that will close my application so that user again restarted the app then session will be regained or we can start the splash activity.

please give me a solution . I will be grateful , thanks


Solution

  • There is an option to get the app crash data using UncaughtExceptionHandler in your application class. So , using this you will be notified when your app will crash. but if you want to exit your app , this is not a good solution as suggested by google core team. So you should handle this using try catch and in catch again calling the service to get the token.