A simple watchdog that detects Android ANR (Application Not Responding) error and throws a meaningful exception.
There is currently no way for an android application to catch and report ANR errors. If your application is not in the play store (either because you are still developing it or because you are distributing it differently), the only way to investigate an ANR is to pull the file /data/anr/traces.txt.
Additionally, we found that using the Play Store was not as effective as being able to choose our own bug tracking service.
It sets up a watchdog timer that will detect when the UI thread stops responding. When it does, it raises an error with all threads stack stack traces (main first).
As this throws an error, a crash handler can intercept it and handle it the way it needs. Known working crash reporters include:
- Price : Free
- License : MIT License
- Visit Link