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 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

Say, I have a Windows service application and also windowed client applications running in
Let's say for example you have 5 different companies using the same platform (Windows
Say I have a third party Application that does background work, but prints out
Say I have an application that used an ORM (I am thinking of nHibernate
Let's say that I have an application frame, and I want to show a
We have a WPF application, let’s say I have a Department object, in it
Hi Sitepoint wizard people, Say we have an admin application that has multiple users
How is the app.config binding in .Net? Let's say if I have an application
Say we have a standard WPF-application, and I want to show some UI-elements on
Say you have the source of an application, and you're debugging the jar via

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.