I've got two Activitys in Android. Lets call them A and B. Activity A has a ViewPager and its data will be loaded via AsyncTask. The user can start Activty B from Activity A.
In Activity B I've got an AutocompleteTextView and its content will be loaded with a AsyncTask, too. (The App will only make an request when it is not cached)
My problem is when I search in Activity B, the AutoCompleteTextView will generate too much AsyncTasks and when I leave Activity B it takes a while too load the data for the ViewPager (in Activity A).
I think the App can only handle some of the AsyncTask at the same time. The rest is waiting and when I leave Activity B there are still waiting some AsyncTasks (for AutocomplteTextView)
My question is: How can I improve this. Can I use a Service (with an extra process)