Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8225383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:23:57+00:00 2026-06-07T15:23:57+00:00

I started an new app and I wanted to use the latest patterns and

  • 0

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” i.e.

Let’s say you want to build an app based on REST calls, one of those calls is in charge of login the user. So while you click submit (on a fragment button) a dialog comes up until the response gets back, if I’m correct the AsyncTaskLoader onLoadFinished won’t let you dismiss a dialog unless you use a handler, and well using this, makes the solution look a bit hacky, cause then you need to show error dialogs like for when the username or password is wrong, and well you may end up with a bunch of calls to handlers.

I did this in a snap using an AsyncTask and all working ok, now that I was moving all the code to AsyncTaskLoader it seems I’m hacking many things when it’s supposed to be easier, I’m a beginner so please be patient with your answers.

I appreciate the time you take.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:23:58+00:00Added an answer on June 7, 2026 at 3:23 pm

    I’m trying to see if Loaders are suposed to really replace all your AsyncTasks “tasks”.

    A Loader performs asynchronous loading of data, monitors the source of its data and delivers new results when the contents of its data changes. An AsyncTaskLoader is a Loader that uses an AsyncTask to offload the Loader‘s operation to a separate thread. An AsyncTask is basically Android’s version of a Thread; it abstracts out the tedious multithreading details and provides a few convenient callback methods.

    In your case, logging in the user is a one-time, potentially expensive REST request… it has nothing to do with loading/monitoring a data source. You should use an AsyncTask instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've started a new iPhone app that needs to remember a single, 40-char string.
I have started a new mvc project and clicked on project\properties\web - use local
I have started a new web application and have decided to use jquery as
I have started a new app a few days ago and began working with
I'm starting a new Titanium app and want to use best practices and avoid
I started a new IOS app project in Xcode 4.3.1. I selected tabbed application
I started a new PHP app on Facebook using Heroku. They start you out
Am learning AppEngine and have started developing new app and want to clarify something.
I started a new blank console app project in VS (I am using VS2010),
Recently I upgraded my gems and started adding new stuff to my app like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.