Android AsyncTask tutorial in Hindi

In this tutorial we will learn how to avoid "Application not responding (ANR)" problem and explore AsyncTask. We will use AsyncTask to process long running task. All of your application components (Activities, Services, ContentProviders, BroadcastReceivers) are created in this thread, and any system calls to those components are performed in this thread. By default everything like activity life cycle, event handling etc also run in UI thread. So we should always avoid doing long running task like network related stuffs, any big data processing etc in UI Thread. We should do it either in separate background thread or we can use AsyncTask provided by Android.



Reference Urls:

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

MainActivity.java Code:

activity_main.xml Code:

AndroidManifest.xml Code:

Comments

Popular posts from this blog

Android Sudoku Game Project With Source Code