Exit on application crash

前端 未结 2 393
南笙
南笙 2021-01-16 09:44

when ever any application crash come I want to exit from the app ?
How to achieve same. does Android manifest have any provision for same.

相关标签:
2条回答
  • 2021-01-16 09:59

    I would recommend to register a global UncaughtExceptionHandler. This catches all the exceptions that are not handled. Then you can do there what you want. For example close the app, inform the user and send a log to yourself.

    0 讨论(0)
  • 2021-01-16 10:09

    You could also use ACRA or a service like BugSense that solve this problem.

    0 讨论(0)
提交回复
热议问题