Questions tagged [asynctaskloader]

AsyncTaskLoader is an Android Loader that uses an AsyncTask to do the loading of data in a background thread.

The AsyncTaskLoader, like other types of Android Loaders, is a class that can be used to avoid having to load data on the main UI thread(loading which may block the UI thread and the app itself). The AsyncTaskLoader was introduced in the Android SDK starting with API level 11(Honeycomb) but is available in older versions through the Android compatibility package. More information about the AsyncTaskLoader along with examples of using one can be found in the documentation for the class.

199 questions
0
votes
0 answers

LoaderCallbacks and screen orientation

I have an Activity implement LoaderCallbacks and start an AsyncTaskLoader from that Activity. When (due to a screen orientation change) the Activity is being destroyed while the AsycTaskLoader is still loading, the Activity seems to 'lose the…
fweigl
  • 21,278
  • 20
  • 114
  • 205
0
votes
3 answers

Android exchange data between running asynctasks

What i am trying to achieve is share data between running asynctask (doInBackground). So whats happening is that i have separate class (extends Asynctask) that loads data and activity with its own Async class which i use to update info in the…
Alex
  • 389
  • 1
  • 2
  • 14
0
votes
1 answer

Android: AsyncTaskLoader crashes when started from fragment

I have this fragment: public class ResultFragment extends Fragment implements LoaderCallbacks{ public static ResultFragment newInstance(Bundle args) { ResultFragment fragment = new ResultFragment(); fragment.setArguments(args); return…
fweigl
  • 21,278
  • 20
  • 114
  • 205
0
votes
1 answer

Notify Fragment when LoaderManager starts loading

I have ListFragment and AsyncTaskLoader which fetches data from internet. ListFragment is filled by BaseAdapter. When data is loading, BaseAdapter fills the first row with spinning progress bar. When data is loaded and no errors occured, data is…
0
votes
1 answer

Android application with Loading dialog - best approach

I'm new in the forum and new in android development. I searched all over internet and around stackoverflow but I can't get an practical answer to my issues. I want to know your opinions about the best approach (handlers, async tasks, etc....) to my…
0
votes
1 answer

Restart Loader from other Fragment

I have a ViewPager with 3 Fragments in there. Each Fragment uses a AsyncTaskLoader to get there Data from a Database. Now i want to restart the loader of Fragment A from Fragment C but if i call getLoaderManager.getLoader( "LOADER_A_ID" ) the…
Happo
  • 1,375
  • 3
  • 16
  • 34
0
votes
1 answer

FragmentActivity, AsyncTaskLoader, ListFragment doesnt load/display on Reset/Resume?

Alternative Titel: ListFragment Content does not get drawn when resuming after background memory has been cleared. You can try this and see the source here it is the ActionBarSherlock demo app version of the Google Demo app. When you open the…
seb
  • 4,279
  • 2
  • 25
  • 36
0
votes
1 answer

AsyncTaskLoader with Dialogs, Is it feasible?

I started an new app and I wanted to use the latest patterns and guidelines for android, one of those is to use Loaders (AsyncTaskLoader) instead of AsyncTasks, I'm trying to see if Loaders are suposed to really replace all your AsyncTasks "tasks"…
0
votes
1 answer

AsyncTaskLoader third task disappears

I'm trying to implement a list/detail workflow where a tap on a list item causes the detail section to load data related to the newly selected row. I'm trying to use an AsyncTaskLoader to accomplish this. I'm running into a problem where if I tap…
-1
votes
3 answers

Android: setTitle inside RecyclerView addOnItemTouchListener is not working

[UPDATE BELOW] I'm trying to change the title in the default title bar after clicking an item in the RecyclerView which is inside onLoadFinished (AsyncTaskLoader) but title doesn't change. The idea is when I tab an item in the RecyclerView and data…
-1
votes
1 answer

AsyncTask Loader & LoaderManager.init() requires callback for third Argument. Which LoaderManager should be used?

LoaderManager loaderManager = getSupportLoaderManager(); Loader loader = loaderManager.getLoader(SEARCH_LOADER); if(loader==null) { loaderManager.initLoader(SEARCH_LOADER,bundle,this);//SEARCH_LOADER-20 } The Below is Hover errorMessage…
Ragavendra M
  • 442
  • 5
  • 15
-1
votes
2 answers

How to passing variables out from AsyncTaskLoader

I make a movie search application using TMDB API, but TMDB always give results in pages with 20 results each page, so I need to arrange interface for page selection. I'm using AsyncTaskLoader to make asynchronous API request, but I don't know how to…
Sofyan Thayf
  • 1,322
  • 2
  • 14
  • 26
-1
votes
1 answer

When android device is in landscape mode menu doesn't work

When selecting a menu option item in landscape mode it seems not to work, it just has a progress loader but when in portrait mode I can select the menu item option and does expected task, it loads new loader and shows items in a gridview. public…
user2070739
  • 367
  • 1
  • 3
  • 15
-1
votes
1 answer

How to get result on onPostExecute from a separate Asynctask class to another fragment class?

I try it but it not show anything, I thing I don't know how to get result of onPostExecute method from separate AsyncTask class to fragment class. Please Help me... public class MainActivity extends AppCompatActivity { @Override protected…
-1
votes
1 answer

Getting Exception "java.lang.IllegalStateException: Content has been consumed" using Json + String same time

Hello guys am new to android and currently learning android. Am making login system for my app. Here is my asynctask @Override protected String doInBackground(String... params) { BufferedReader in = null; …
1 2 3
13
14