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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:10:47+00:00 2026-05-14T03:10:47+00:00

I have a code that sets a new repeating alarm (on production I’ll use

  • 0

I have a code that sets a new repeating alarm (on production I’ll use a inexactRepeating), but the BroadCastReceiver I’ve registered for handling it is not being called.

Here is the code where I set the alarm:

newAlarmPeriod = 5000; // For debugging

Intent alarmIntent = new Intent(this, GroupsCheckAlarmReceiver.class);
PendingIntent sender = PendingIntent.getBroadcast(this, Constants.CHECK_ALARM_CODE,
                                                  alarmIntent, 0);

AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() 
                + newAlarmPeriod, newAlarmPeriod, sender);

It seems to work and it triggers and alarm every five seconds, as seen in the output of “adb shell dumpsys alarm”:

DUMP OF SERVICE alarm:
Current Alarm Manager state:

  Realtime wakeup (now=1269941046923):
  RTC_WAKEUP #1: Alarm{43cbac58 type 0 android}
    type=0 when=1269997200000 repeatInterval=0 count=0
    operation=PendingIntent{43bb1738: PendingIntentRecord{43bb1248 android broadcastIntent}}
  RTC_WAKEUP #0: Alarm{43ce30e0 type 0 com.almarsoft.GroundhogReader}
    type=0 when=1269941049555 repeatInterval=5000 count=1
    operation=PendingIntent{43d990c8: PendingIntentRecord{43d49108 com.almarsoft.GroundhogReader broadcastIntent}}
  RTC #1: Alarm{43bfc250 type 1 android}
    type=1 when=1269993600000 repeatInterval=0 count=0
    operation=PendingIntent{43c5a618: PendingIntentRecord{43c4f048 android broadcastIntent}}
  RTC #0: Alarm{43d67dd8 type 1 android}
    type=1 when=1269941100000 repeatInterval=0 count=0
    operation=PendingIntent{43c4e0f0: PendingIntentRecord{43c4f6c8 android broadcastIntent}}

  Broadcast ref count: 0

  Alarm Stats:
  android
    24390ms running, 0 wakeups
    80 alarms: act=android.intent.action.TIME_TICK flg=0x40000004
  com.almarsoft.GroundhogReader
    26ms running, 2 wakeups
    2 alarms: flg=0x4 cmp=com.almarsoft.GroundhogReader/.GroupsCheckAlarmReceiver

But for some reason my BroadCastReceiver is not being called when the alarm is triggered. I’ve declared it on the Manifest:

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

And this is the abbreviated code:

public class GroupsCheckAlarmReceiver extends BroadcastReceiver{
  @Override
  public void onReceive(Context context, Intent intent) {
     Toast.makeText(context, "XXX Alarm worked.", Toast.LENGTH_LONG).show();
     Log.d("XXX", "GroupsCheckAlarmReceiver.onReceive");
  }
  • 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-14T03:10:47+00:00Added an answer on May 14, 2026 at 3:10 am

    I found the problem, and it was a pretty stupid error. The <receiver> tag was inside the <manifest> but outside the <application> tags. Thanks for your time, guys.

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

Sidebar

Related Questions

I have the following code that sets a cookie: string locale = ((DropDownList)this.LoginUser.FindControl(locale)).SelectedValue; HttpCookie
Hashtables have a syncroot property but generic dictionaries don't. If I have code that
I am querying information from Active Directory . I have code that works, but
I have code that's working beautifully on my development machine, but when deployed to
I have code like this that sets the map type to Terrain View: map
I have code that references a web service, and I'd like the address of
I have code that looks like the following, which works fine for displaying the
I have code that looks like: //System.Data.IDataRecord dr try { Consolidated = Utility.NullConvert.ToBool(dr[Constants.Data.Columns.cConsolidated], false);
Following on from this question I now have code that can attach to a
Right now, I have code that looks something like this: Private Sub ShowReport(ByVal reportName

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.