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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:10:53+00:00 2026-06-09T11:10:53+00:00

If a user reboots their phone while my activity is in the foreground, after

  • 0

If a user reboots their phone while my activity is in the foreground, after the phone reboots, the activity automatically pops up again. I don’t want this to happen because none of the extra data I pass to the activity is saved, so the activity does not have the correct display.

Apparently the activity is started even before my BroadcastReceiver that has an intent-filter with android.intent.action.BOOT_COMPLETED starts.

How would I go about preventing the activity from automatically starting when the phone boots?

Edit: I use the android.intent.category.HOME category in my intent filter for my activity, which apparently is the reason for it starting up on reboot.

  • 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-09T11:10:55+00:00Added an answer on June 9, 2026 at 11:10 am

    The ACTION_SHUTDOWN broadcast is supposed to go out when the device is shutting down. I say “supposed to go out”, because it assumes an orderly shutdown. If the user winds up holding the POWER button for ~10 seconds, or popping out the battery, I would assume that ACTION_SHUTDOWN is not broadcast.

    To control whether a component (e.g., activity) is available, you can use PackageManager and setComponentEnabledSetting(). A disabled component cannot be run and is generally invisible (e.g., a disabled app widget’s <receiver> will not show up in the app widget picker).

    In theory, you can combine these two. However, even at the best of times, I would assume that ACTION_SHUTDOWN behaviors are rather time-limited (so be quick about it), and you will need to handle the “disorderly” shutdown scenarios.

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

Sidebar

Related Questions

User Region Points Last_Updated 1 5 0 1-Nov-09 I want this row 2 1
I have a receiver that start after phone boot like this: <receiver android:name=.OnBootReceiver >
I want to Register some user defined character fonts programmatically. According to this article
User Story: Action for Facebook that has open graph object. For this I need
User inserts a string in a html form input on browser. This string is
I want to create a web page that allows the user to initiate a
First , I want to thank all the persons who works for this site,
Problem: I want to write a process that will allow a user to take
I am using devise for the user registration... and i want to translate it
There is a windows explorer extension dll. This dll can be update automatically if

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.