I want to design custom ANR Dialog so that when ANR comes, it shows our own dialog instead ANR dialog. How can I do this?
Asked
Active
Viewed 971 times
1
-
2The best way to handle ANR dialogs is not to cause then in first place. Never do something the in the main thread that will take long. – André Oriani Sep 03 '12 at 06:09
1 Answers
4
Android ANR dialog is a System Handled (Generated) you don't have a any control over it..
As its implemented in System OS Source So you can't change the ANR Dialog. As you can't catch when ANR comes.
The only option is modifying the Android OS Source.

user370305
- 108,599
- 23
- 164
- 151
-
Instead of Handling ANR Dialog try to make sure your Application doesn't generate ANR. Put Lengthy operation in worker thread and keep Main UI Thread simple.. – user370305 Sep 03 '12 at 06:13
-
How to modify the android OS Source to control over ANR dialoge? please look into this ques http://stackoverflow.com/questions/17613709/application-not-responding-aosp?noredirect=1#comment25638489_17613709 – Dhasneem Jul 12 '13 at 11:33