Cook-E-team / Cook-E

A mobile application that helps schedule cooking with multiple recipes
GNU General Public License v3.0
2 stars 1 forks source link

No database access should be done on the main thread #26

Open samcrow opened 8 years ago

samcrow commented 8 years ago

The current code access local and remote databases on the main (user interface) thread. This is not good for the perceived responsiveness of the application.

The current code overrides the StrictMode policy and allows network access on the main thread. Before the final release, we should remove the override and move all database accesses off of the main thread.

Useful links:

https://developer.android.com/training/articles/perf-anr.html

https://developer.android.com/reference/android/os/AsyncTask.html

https://developer.android.com/reference/android/os/Handler.html

samcrow commented 8 years ago

Branch async now has asynchronous loading implemented for the home activity.