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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:15:11+00:00 2026-06-08T18:15:11+00:00

I have an android setInexactRepeating placed inside of my onCreate that never fires. I

  • 0

I have an android setInexactRepeating placed inside of my onCreate that never fires. I have a log inside of it to make sure that it’s actually executing, and that doesn’t seem to fire, as well as the events that I have planned for it. I want it to go off every 10 seconds, but it doesn’t even seem to go off even the first time.

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Log.d("Restart", "First");
    Intent toRun = new Intent(this, AlarmRestart.class);
    PendingIntent pendingToRun = PendingIntent.getBroadcast(this, 0, toRun, 0);
    AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
    am.cancel(pendingToRun); 
    am.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, System.currentTimeMillis(), 10000L, pendingToRun);

    Log.d("Restart", "Second");
}

This is in the other file:

public class AlarmRestart extends BroadcastReceiver {
    public void onReceive(Context context, Intent intent) {
        Log.d("Restart", "Third");
    }
}

This is what “adb shell dumpsys alarm” says

com.packageName.restart
5715ms running, 64 wakeups
3 alarms: flg=0x14 cmp=com.packageName.restart/.AlarmRestart
61 alarms: flg=0x14 cmp=com.packageName.restart/.reciever.AlarmRestart
  • 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-08T18:15:12+00:00Added an answer on June 8, 2026 at 6:15 pm

    I found the problem :/

            <reciever android:name="com.appName.restart.AlarmRestart" android:enabled="true" />
    

    It’s spelled receiver….not reciever. Seriously, XML needs an error checker. I’m still marking CommonWares answer as the accepted one, because he solved several other issues that I would have run into later.

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

Sidebar

Related Questions

I have Android client app that communicates with server using Socket . On my
I have android.permission.READ_OWNER_DATA but I can't find any reliable code that would explain how
I have android application and service that runs in separate process. Application and service
I have android code that uses a background process to routinely (e.g. hourly) connect
I have learned that when using android:entries with a ListView , it uses android.R.layout.simple_list_item_1
I have android application that is written regular way. layouts, java, APK. Now, depending
I have android application that I need to debug using eclipse. When I right
I have android test project that i've integrated into the Hudson. I have created
I have android app that talks to server and syncs some data int SQLite
I have an Android application that uses tabs. I already have the tabs, 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.