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 6197325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:48:05+00:00 2026-05-24T03:48:05+00:00

Does anyone know how to easily arrange multiple calls to an AsyncTask execution in

  • 0

Does anyone know how to easily arrange multiple calls to an AsyncTask execution in a queue or something and then execute them in a serial fashion?

I want the called async task to wait while the one before it is finished, but is seems I can’t accomplish this, even if I test the status of the one currently being executed.

Any ideas how to solve this? I’ve seen that in the honeycomb API there is a method executeOnExecutor() with a SERIAL_EXECUTOR, I guess it implements what I’ve described. However, I’m not developing for honeycomb.

Thanks!

  • 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-05-24T03:48:06+00:00Added an answer on May 24, 2026 at 3:48 am

    You might try IntentService. From the reference:

    IntentService is a base class for Services that handle asynchronous requests (expressed as Intents) on demand. Clients send requests through startService(Intent) calls; the service is started as needed, handles each Intent in turn using a worker thread, and stops itself when it runs out of work.

    I ran the service from a broadcast receiver as follows:

        // Now let the service module do the rest
    
        Intent serviceIntent = new Intent(context, Service.class);
        serviceIntent.putExtra(GC.EXTRA_SERVICE_DATA, serviceData);
        ComponentName compName = context.startService(serviceIntent)
    

    It worked as advertised. The requests are serialized fine. The service started when a request was received. The service stopped after the last request processed. The requests were processed FIFO.

    I created the intentservice using right click on the source package name and selecting New/Class. I used intentservice as the superclass. The constructor has an arguement of ‘name’. I changed it to:

        public XxxService() {super("XxxService");}
    

    All of the code for the service went into the onHandleIntent function. I didn’t have to use any other @Override functions.

    Hope this is what you wanted…

    Notes: The variable ‘context’ is a passed parameter in onReceive. I changed the names in the code from XxxxService to ‘Service’ or ‘service’. Finally, I create a class in all my projects called GC. It is a container class for global constants. GC.EXTRA_SERVICE_DATA is a global String defining the extra key.

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

Sidebar

Related Questions

Does anyone know of any eclipe plugin that lets you easily change and use
Does anyone know of an MD5/SHA1/etc routine that is easily used with GLib (i.e.
Does anyone know of any C++ Libraries which I can easily integrate in a
Does anyone know of a reference that explains the different open-source licenses in easily
Does anyone know of a framework that would allow me to easily host and
Does anyone know if we can resize a QR-Code easily by using a proper
Does anyone know how to get IntelliSense to work reliably when working in C/C++
Does anyone know how to transform a enum value to a human readable value?
Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that
Does anyone know of a FOSS Python lib for generating Identicons ? I've looked,

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.