Reputation: 629
I want to know about ANR dialog in android applications and when it will happen and how to remove that. Please help me.
Upvotes: 0
Views: 3420
Reputation: 137322
ANR - application not responding.
This dialog appears when the main thread of the application is blocked for too long, for example, when you sleep on this thread, or performing a long connection.
Avoiding it is done by moving the heavy operations to other threads. There's a great article regarding the ways to implement that - Painless Threading.
Upvotes: 4
Reputation: 1006779
It will happen when you spend too much time on the main application thread. To avoid ANR errors, ensure any long-running work occurs on a background thread.
Upvotes: 2