Android ANR - Input dispatching timed out Android ANR - Input dispatching timed out android android

Android ANR - Input dispatching timed out


Your issue is occurring in Handler, which means it's happening on the main thread. You should call all billing processor methods on an IO thread to avoid blocking your main thread.

There are literally too many possible ways to do this to describe succinctly. AsyncTasks, RxJava, vanilla Threads, Android Service, etc..


Any types of time expensive procedure like data syncing through network shouldn't do in main thread. Android has some default built-in methods like AsyncTask, IntentService etc. those are on worker thread. Personally I have not good idea about Retrofit 2. If it works on main thread, that case you should use it in a separate thread.