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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:38:32+00:00 2026-06-05T08:38:32+00:00

I have a problem regarding Alarm manager in Android. I have the following code

  • 0

I have a problem regarding Alarm manager in Android.
I have the following code snippet to set an alarm that should be fired each week(once).

  // Add the time and set when the notification will be triggered
    Calendar setCalendar = item.getDate();
    calendar.set(Calendar.MINUTE,setCalendar.get(Calendar.MINUTE)+10080);

   //Create a new alarm intent
   Intent alarmIntent = new Intent(ApplicationUtils.getApplicationContext(), AlarmReceiver.class);


   PendingIntent sender = PendingIntent.getBroadcast(ApplicationUtils.getApplicationContext(), requestCode, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);

        // Get the AlarmManager service
        AlarmManager alarmManager = (AlarmManager) context.getSystemService(context.ALARM_SERVICE);
        alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.ELAPSED_REALTIME, sender);

And I have to following problem. When the week is changed, the notifications are coming up and they never stop.
Does anybody have any idea how can I set the calendar so the alarms are triggered once a week?

Thanks, Arkde

  • 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-05T08:38:35+00:00Added an answer on June 5, 2026 at 8:38 am

    You’re third parameters in setRepeating is incorrect. It should be an interval between the repeating alarms in milliseconds.

    A week would be: 1000 * 60 * 60 * 24 * 7 .

    http://developer.android.com/reference/android/app/AlarmManager.html#setRepeating(int, long, long, android.app.PendingIntent)

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

Sidebar

Related Questions

I have a problem regarding Android App. I have created an application that download
I have the following code, and i have a problem regarding changing the ringtone
I have a problem regarding the ksoap2. My problem is that the project used
I have a cross-language problem regarding md5 :). I have this code in Java:
I have a problem regarding multiple inclusion of header file in C++ code. Say
I have a problem regarding display PHP code (stored in a database) on a
i have a problem regarding the responseXML of ajax.. I have this code from
I have a problem regarding my intent. It seems that my app crashes when
I have just solved another problem regarding the same piece of code but I
I have a strange problem regarding null pointer exception. I'm posting the problematic code

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.