Code example for AsyncTaskLoader

0
  } 
 
  private Account account;
 
  public MusicSearchLoader(Context context, Account account){
    super(context);
    this.account = account;
  } 
 
  public MusicSearchResult loadInBackground(){ 
    return attemptSearch(true); 
  } 
 
  private MusicSearchResult attemptSearch(boolean attemptReauth){
    AccountManager am = AccountManager.get(getContext());
    String authToken = "";
    try{ 
      authToken = am.blockingGetAuthToken(account, "", true);
    } 
    catch(IOException e){
Connect your IDE to all the code out there  Get Codota for Java