Aryan PrajapatKnowledge Contributor
What are the measures to avoid application ANR?
What are the measures to avoid application ANR?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
ANR in application is annoying to user. It can be caused due to various reasons. Below are some of the tips to avoid ANR
Perform all you long running network or database operation in separate thread
If you have too much of background tasks, then take it off the UI thread. You may use IntentService
Server not responding for longer period can be guilt for ANR. To avoid always define HTTP time out for your all your webs service calls.
Be watchful of infinite loops during your complex calculations