How we can avoid the ANR situation?

: 211
Paper : Android Development FAQ (Frequently Asked Questions and answers) | Platform : Apps Development | Category : Development FAQs

The following things you can do to avoid the situation:

  • A developer can perform lengthy database and networking operating in individual threads.
  • Create a child thread and put a part of the code that is non-responsive for a long time. Keep that part away from the main thread so that it can respond in a minimum required time.
  • Release the pressure on UI by using the IntentService method.
Suggested Papers: