0 votes
in Android by
What is ANR in Android? What are the measures you can take to avoid ANR?

1 Answer

0 votes
by

ANR(Application is Not Responding) is a dialog box that appears when the application is not responding. This ANR dialogue is displayed whenever the main thread within an application has been unresponsive for a long time under the following conditions:

When there is no response to an input event even after 5 seconds.

When a broadcast receiver has not completed its execution within 10 seconds.

Following measures can be taken to avoid ANR:

An application should perform lengthy database or networking operations in separate threads to avoid ANR.

For background task-intensive applications, you can lessen pressure from the UI thread by using the IntentService.

Related questions

0 votes
asked Nov 4, 2021 in Cloud Foundry by john ganales
0 votes
asked Oct 14, 2022 in Android by AdilsonLima
...