Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Mobile Technologies Interviews:3GAndroidAndroid DeveloperAndroid Software EngineerApp Store Optimizer (ASO)BlackberryiPhoneMobile App ArchitectMobile ApplicationMobile Application DeveloperMobile Apps DeveloperSr. Android DeveloperWireless Communication
Copyright © 2018. All Rights Reserved
Sr. Android Developer Interview Question:
Tell us what is an ANR? What are some measures you can take to avoid ANR?
Submitted by: MuhammadANR stands for ‘Application Not Responding'. This dialogue is displayed if the main thread in the application has been unresponsive for a long time and in the following conditions:
☛ When there is no response to an input event after 5 seconds.
☛ When a broadcast receiver is not done executing within 10 seconds.
Following measures can be taken to avoid ANR:
► To avoid ANR, an app should perform a lengthy database or networking operations in separate threads.
► One technique is to create a child thread to prevent the Android system from concluding a code that has been unresponsive for a long period of time. Most of the actual workings of the codes can be placed within the child thread to ensure that the main thread runs with minimal unresponsive time.
► For background task-intensive apps, you can alleviate pressure from the UI thread by using the IntentService.
Submitted by: Muhammad
☛ When there is no response to an input event after 5 seconds.
☛ When a broadcast receiver is not done executing within 10 seconds.
Following measures can be taken to avoid ANR:
► To avoid ANR, an app should perform a lengthy database or networking operations in separate threads.
► One technique is to create a child thread to prevent the Android system from concluding a code that has been unresponsive for a long period of time. Most of the actual workings of the codes can be placed within the child thread to ensure that the main thread runs with minimal unresponsive time.
► For background task-intensive apps, you can alleviate pressure from the UI thread by using the IntentService.
Submitted by: Muhammad
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.