Science, asked by akashpunkstr4211, 1 year ago

How can ANR be prevented in Android?

Answers

Answered by gourab2717guha
0

One technique that prevents the Mobile Android development system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.

Hope this will help. Thank u.

Answered by madhavagrawal51
0
If you are getting ANR in your app then there is something wrong in your code. Don't do anything time consuming ( database quieries, fetching data from internet) on main thread. Use async task or threads to do heavy stuff.

Hope!! you like it.
Similar questions