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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:09:53+00:00 2026-06-13T04:09:53+00:00

I just started working coverting my iOS app to Android. But I’m having the

  • 0

I just started working coverting my iOS app to Android.
But I’m having the following problem.

I created multiple classes so the alert pops-up.
But the problem is that the alert pop-ups every 5/10 seconds instead of the given time.
I know this has something to do with the following code:

alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, SystemClock.elapsedRealtime() + 5000, 10000, pendingIntent);

But the strangest thing is that the given time above that code doesn’t trigger any thing:
(Otherwise I could’ve just deleted the last line of code)

private void setRecurringAlarm(Context context) {
    Calendar updateTime = Calendar.getInstance();
    updateTime.set(Calendar.HOUR_OF_DAY, 17);
    updateTime.set(Calendar.MINUTE, 18);

    Intent open = new Intent(this, AlarmReceiver.class);
    open.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, open, PendingIntent.FLAG_CANCEL_CURRENT);
    AlarmManager alarmManager = (AlarmManager) getSystemService(MyApp.ALARM_SERVICE);
    alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, SystemClock.elapsedRealtime() + 5000, 10000, pendingIntent);

What’s wrong with that code because the alarm doesn’t pop-up at 17:18 but each time after 5 or 10 seconds.
The service that i’ve created to display the notification doesn’t start at 17:18 to display the message.
Does this has something to do with my timezone (Amsterdam Time)?

  • 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-13T04:09:54+00:00Added an answer on June 13, 2026 at 4:09 am

    I think you’re passing in the wrong values for .setRepeating. Have a look at the documentation

    It looks to me like you’re saying:
    broadcast for the first time 5 seconds from now, then every 10 seconds after that repeat

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

Sidebar

Related Questions

Just started working with .NET and MVC(1). I'm having a problem wherein in my
Just started working with android and ran into a small problem. I am have
I just started working with android. The problem is that XML parser doesn't process
I just started working with the Android NDK but I keep getting SIGSEGV when
I just started working on alfresco v 3.4. I have created document library action
I just started working with CodeIgniter and I am having some trouble with the
I just started working on a project that uses Entity Framework. Prevoiusly, the app
I just started working on a project that will run on google app engine
I just started working in an environment that uses multiple programming languages, doesn't have
Having just started working for a new client I have noticed that their database

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.