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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:03:49+00:00 2026-05-27T00:03:49+00:00

Thanks a ton to this site, I have made significant progress with my first

  • 0

Thanks a ton to this site, I have made significant progress with my first Android project.

I’m trying to get the execution suspend in the onReceive() method of a boot completed receiver. Below are my manifest and receiver code.

Android 2.3.3
API – 10
IDE – Eclipse
Running on emulator

Manifest:

<?xml version="1.0" encoding="utf-8"?>
  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.demo.notepad3" >

<uses-sdk android:minSdkVersion="10" />

<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<application android:icon="@drawable/icon" >
    <activity
        android:label="@string/app_name"
        android:name=".ProjectTrackerHomeActivity" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".ProjectTrackerEditActivity" />

    <receiver android:name=".ProjectTrackerNotification" />

    <receiver
        android:name=".ProjectTrackerOnBootReceiver" >
        <intent-filter >
            <action android:name="android.intent.action.BOOT_COMPLETED" />
        </intent-filter>
    </receiver>
</application>

</manifest>

Receiver:

public class ProjectTrackerOnBootReceiver extends BroadcastReceiver {
private ProjectTrackerDBAdapter mDbHelper;

@Override
public void onReceive(Context context, Intent intent) {
    Debug.waitForDebugger();
    AlarmManager
              mgr=(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);

              //I place the break point at line 2, the alarm manager line

             // Further code, irrelevant
    }

My observations –
1. When I run this application in debug mode on eclipse, the break point is not even hit.
2. When I run some other application in debug mode, this break point is hit momentarily! But before I can proceed with a step by step execution, the execution resumes. It doesn’t stop there.

My reasoning for this behavior is that –
1. When I run some other application, since this above app is already installed, it catches the boot complete broadcast and so the breakpoint is hit. (But why doesn’t the execution halt at the breakpoint?)
2. When I run only this app, it gets installed first and in the time it takes for installation, it misses the boot complete broadcast.

May I please get some assistance with the below queries –
1. How can I make the execution halt at the breakpoint without it resuming further?
2. Can I somehow run an already installed version of this app on the emulator in debug mode “without having it to get freshly installed” on the emulator every time I run it?
3. Is there anything else I’m doing wrong or missing something?

Kindly let me know since I really need to debug through onReceive() to catch further application logic bugs. Thanks a lot, folks.

  • 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-27T00:03:50+00:00Added an answer on May 27, 2026 at 12:03 am

    You need to shutdown the phone and start it up to ever see onReceive get called from bootcompleted. To debug this, just add a Log statement in onReceive instead of setting a breakpoint. Otherwise, you’ll have to add some action to the receiver in the manifest and then manually sendBroadcast(new Intent("someName")) with the name you specified in the receiver element in the manifest.

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

Sidebar

Related Questions

Thanks for reading this. I have no idea why this is throwing a NullReferenceException
Thanks for stopping by. this static analyser warning is annoying me here is my
thanks for your reading. I am trying to modify Jquery Nivo Zoom plugin to
Thanks in advance for your help. I have a need within an application to
Thanks for reading. I have done a search, read multiple posts (lost count) and
This might be hard to describe without copying and pasting a ton of code
I have a web site that is throwing OutOfMemoryExceptions on whenever it gets to
I am new to LINQ and am trying to sort this one out. I
I'm trying to use Apache::Session::Memcached in an HTML::Mason project where I'm using MasonX::Request::WithApacheSession to
Firstly, thanks a ton to the StackOverflow community. I am new to C#, and

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.