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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:25:17+00:00 2026-05-18T21:25:17+00:00

After reading some questions/answers about activity and process lifecycle. I suppose I understand the

  • 0

After reading some questions/answers about activity and process lifecycle. I suppose I understand the details about activity and process lifecycle. But I’m confused about these Observers like BroadcastReceiver/ContentObserver with process lifecycle .

What I want to know is, when I register a BroadcastReciver (i.e, a BroadcastReceiver listen on SMS receive intent),if the process which registered the BroadcastReceiver does exist already, when the system calls the BroadcastReceiver,

  1. is it in the same process ?
  2. And because the process does not terminated, these static data in the process can be used directly, right ?
  3. On the other hand, if the process has been terminated already, the system will launch the process again and of course these static data is null ?
  4. When the system calls the BroadcastReceiver, will it call the main activity onCreate also ?

Thanks.

  • 1 1 Answer
  • 1 View
  • 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-18T21:25:18+00:00Added an answer on May 18, 2026 at 9:25 pm

    1.) Not sure what you mean by “process which registered the BroadcastReceiver.” If you provide a named process for your BroadcastRecevier (), then it will be created in a process whose name comes form your application’s package plus the name attribute (XYZ). If a process with that name already exists, then a new process will not be created and your BroadcastReceiver will be created within the existing process.

    2.) So if the process was still in memory, then you are correct that there may be static data already initialized.

    3.) Correct, any static data will have to be reinitialized in this case.

    4.) If the BroadcastReceiver’s process does not already exist, then the process will created, but that BroadcastReceiver will be the only thing created in the process. No Activities will be started.

    The only thing that makes an Activity a “main” Activity is that it is registered to handle certain kind of Intent with an action of android.intent.action.MAIN. This is the kind of Intent that is broadcast when an app is “launched.” A user can switch to an already running app, and no the “main” Activity does not come into play as an Intent with action MAIN is not broadcast in this case. The point is that at a “main” Activity has no special relation with the process that it runs in. It only has a special relationship with a specific kind of Intent.

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

Sidebar

Related Questions

After reading some questions and answers about enum I don't find it really useful...
So, after reading some SO questions and answers, i still doesn't understand why use
I came across couple of questions about OCL expressions. After reading some university slides
After reading a couple of answers and comments on some SQL questions here, and
After reading some articles about XSS I have incorporated HTMLPurifier into my zend framework
I'm trying to understand how ID3 tags work, so, after reading some documentation, I
After reading some examples on stackoverflow, and following some of the answers for my
After searching a lot, reading every tutorials I've found and asking some questions here,
After reading this question, I need to clear up some things. IQueryable<Customer> custs =
After reading some material on this subject I'm still not sure what the difference

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.