Nicolas Mouchel posts

Archi & Techno

Asynchronism in mobile

In Android, asynchronous tasks are done to avoid long operations in the main thread. Android documentation gives a good advice to the community to avoid ANR (Android Not Responding): Therefore, any method that runs in the UI thread should do as little work as possible on that thread. In particular, activities should do as little as possible to set up in key life-cycle methods such as onCreate()and onResume(). Potentially long running operations such as network or database operations, or computationally expensive calculations such as resizing…

Read more