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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:40:59+00:00 2026-06-05T11:40:59+00:00

I have a very simple IntentReceiver to receive event when time changes. Here’s the

  • 0

I have a very simple IntentReceiver to receive event when time changes. Here’s the code:

public class IntentRec extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Log.i("IntentRec", intent.getAction());
    }
}

<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
    <receiver android:name=".IntentRec">
        <intent-filter>
            <action android:name="android.intent.action.TIME_SET"/>
        </intent-filter>
    </receiver>
    <activity android:name="MyActivity"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
</application>

However, I receive the intent while the application is running. But if I shutdown (using Force Close) the app, onReceive is not called. So my question is, do I receive intents only when listener app is running? I thought that intents was designed to run target listener class when the app was not running.

Thanks

  • 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-05T11:41:02+00:00Added an answer on June 5, 2026 at 11:41 am

    The solution is simple: stop clicking Force Close.

    On Android 3.1+, Force Close will prevent anything in your app from running again, until the user runs an activity of yours manually, or something else (e.g., third-party app) starts up your app.


    UPDATE

    I suspect that you are being confused by multiple meanings of the word “stopped”. Let’s walk through the process, avoiding the word “stopped”, to see if it helps.

    When your app is first installed on an Android device, is in a state known to some as “snicklefritzed”. While the app is in this “snicklefritzed” state, no manifest-registered BroadcastReceiver will work. To move an app out of the “snicklefritzed” state, some third-party app (like the home screen launcher) must explicitly request to run something in your app (like an activity). So, the normal course of events is that the user downloads your app, clicks on the launcher icon for it, and your app is moved into the “normal” state and away from the “snickelfritzed” state. While in the “normal” state, your BroadcastReceiver will work fine.

    Let’s suppose that your BroadcastReceiver is for the ACTION_BOOT_COMPLETED broadcast. The “snicklefritzed” state has nothing to do with whether your app is presently running or not — it is dependent only upon if your app has ever run or not. Hence, if the user installs your app, but reboots their phone before doing anything with your app, your ACTION_BOOT_COMPLETED receiver will not get control at boot time. If, however, the user runs something in your app, then reboots the phone, your receiver will receive the ACTION_BOOT_COMPLETED broadcast as normal.

    Normally, apps move out of the “snicklefritzed” state and never return to that state. One thing that will cause an app to be “snicklefritzed” again is if the user clicks on Force Close for this app in Settings. Here, the user is expressly telling Android that your app is misbehaving and should not run again until the user says otherwise. If, of course, the user launches your activity again, you move back to “normal” state.

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

Sidebar

Related Questions

Let's say we have very simple Java class MyClass . public class MyClass {
I have very simple: [PrincipalPermission(SecurityAction.Demand, Role = Administrator)] public partial class _Default : System.Web.UI.Page
I have very simple code and I am not sure why the Foo function
I have very simple code: List<String> list = new ArrayList<String>(); String a = a;
I have very simple html page with js code: <html> <head> <title></title> </head> <body>
I have very simple aspx page & code: <%@ Page Language=C# AutoEventWireup=true CodeFile=Default.aspx.cs Inherits=_Default
I have very simple piece of code. The goal is when i input four-digit
i have very simple code that i making partial postback by jquery and i
I have very simple window where I have 2 buttons - one for cancel,
I have a very simple webforms app that will allow field techs to order

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.