1.

How Do You Avoid An Anr?

Answer»

You BASICALLY want as little work done as POSSIBLE on the main THREAD, also known as the UI thread. Since that is the core single thread that your application runs on, you would want to keep activities that require more complex computations or network and database connections, for example, on separate worker THREADS so as not to slow down the main thread.

You basically want as little work done as possible on the main thread, also known as the UI thread. Since that is the core single thread that your application runs on, you would want to keep activities that require more complex computations or network and database connections, for example, on separate worker threads so as not to slow down the main thread.



Discussion

No Comment Found