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

  • SEARCH
  • Home
  • 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 8027837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:56:06+00:00 2026-06-04T23:56:06+00:00

I think I’ve got the point of IntentService class. it handles a queue which

  • 0

I think I’ve got the point of IntentService class. it handles a queue which prevents too or more instances of the service been executed together.

I’ve found it useful, but what if I have too derived classes from IntentService which have different purpose, and I want both of them running together without waiting to each other?

It was great if there is any flag or attribute I can set, that will say something like: “allow to too or more diffrent derived class of intent service to run each one on his own queue”

is there any way doing that?

I know about all the other alternatives such as “regular” service, AsyncTesk, manually manage threads, so please don’t suggest me consider using them instead. I know their advantages and limitations.

thanks in advance.

  • 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-04T23:56:08+00:00Added an answer on June 4, 2026 at 11:56 pm

    There’s nothing preventing two IntentServices from executing together.

    As an example, given a service, ServiceA

    public class ServiceA extends IntentService {
       ...
    }
    

    and a subclass of ServiceA aptly named ServiceB

    public class ServiceB extends ServiceA {
    }
    

    ServiceB will not share an executor/queue (or anything else for that matter) with ServiceA, i.e. both can execute at the same time. You can easily test this by putting a loop in ServiceA, e.g.

    protected void onHandleIntent(Intent intent) {
        for (int i = 0; i < 20; i++) {
            System.out.println(getClass().getSimpleName() + " says hello");
            try {
                Thread.sleep(2000L);
            } catch (InterruptedException e) {
                return;
            }
        }
    }
    

    and then calling

    startService(new Intent(this, ServiceA.class));
    startService(new Intent(this, ServiceB.class));
    

    from your Activity. They will both be running at the same time.

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

Sidebar

Related Questions

Think about the games like Spiral Knights and Minecraft(Which I believe both use LWJGL)
Think of the following services on one box: SOCKS proxy HTTP proxy SSH service
I think this has probably been asked, but after reading a lot, I'm not
Think about a rectangular div, which is split into 2 parts, each part is
Think you are the proud owner of Facebook, then which data you want to
I think that I have a quite strange question. I am using a class
Think I have a service that play musics , Also I have an actvity
I think I've almost got it, but not there quite... I want to select
Think about the following: Your ISP offers you a dynamic ip-address (for example 123.123.123.123).
Think: tiling my emacs window with eshells, a la xmonad. Is this possible? I

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.