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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:45:48+00:00 2026-05-21T19:45:48+00:00

Say I have an application, where there is a service running in a loop,

  • 0

Say I have an application, where there is a service running in a loop, this service is started by an intent. I then have another application (the same, but with a different AppID) wanting to start the same service, while the prime service is still running. How can intents handle this? (Note: I want both services to run at the same time…)

I’m looking for an understandable answer that explains the “HOW” behind it, not as much: “well this code takes care of THAT!”. It’s no problem if your answer doesn’t fit my example, as I’m still VERY new my question might be asked in an odd (or even dumb) way, I apologize beforehand.

Thanks!
– Bobby

  • 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-21T19:45:48+00:00Added an answer on May 21, 2026 at 7:45 pm

    A Service has to be declared in the AndroidManifest.xml: this specifies the Service class. You can launch the Service using either an explicit Intent (specifying the service class (and optionally the component name)) or using an Intent that will match an IntentFilter associated with the service.

    Case 1 is using an explicit Intent. If only 1 app registers the class as a Service then in your second app you will have to use an Intent with a ComponentName that wll start the first app’s copy of the service. In this case, only 1 instance of that Service class will be active. If both apps register the class as a Service your intent will launch a second instance of that Service class.

    Case 2 is using an IntentFilter. If both Service declarations use the same IntentFilter then IntentFilter priorities kick in: the Service declaration with a higher priority fires off, and will essentially always win, so you will only ever have 1 instance of that Service class running. If both Service declarations have the same priority then its a tossup which one gets used.

    In any case there will be (for any 1 Service declaration) at most one copy of that service running at any time. You can get crazy with “remote” process declarations but that’s about it I think.

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

Sidebar

Related Questions

I have a WCF Service Application. I have 2 different contracts(services). I did this
Say I have a third party Application that does background work, but prints out
Let's say for example you have 5 different companies using the same platform (Windows
Say you have an application divided into 3-tiers: GUI, business logic, and data access.
Let's say I have my pizza application with Topping and Pizza classes and they
Let's say I have an existing application written in Java which I wish to
Say I have default content on the left side of my application, which is
Let's say I wanted to have an application that could easily switch the DB
Let's say I have a simple ASP.NET MVC blog application and I want to
Let's say I have a container (std::vector) of pointers used by a multi-threaded application.

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.