ANR means App Not Responding. The reason we can receive ANR notification is that the app is working too much on it's main thread.
How to avoid ANR notification
If you are going to perform any complex operation (time consuming) then you should probably use a separate thread for it. Doing so you will not freeze your main thread.