Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 1 of 1
  1. Thread Author  Thread Author    #1  

    Default Re-Enabling the Alarm

    Hi All,

    I have created one Alarm in my application. Later the user can disablethe alarm and also re-enable alarm.

    The problem is that, when user clicks on re-enable the alarm, I create a new alarm with the previous time but the alarm gets fired instantly...

    I am setting the alarm as below...
    alarmManager.setRepeating(AlarmManager.RTC, time, AlarmManager.INTERVAL_DAY, PendingIntent.getBroadcast(this, alarmUniqueCode, intentAlarm, PendingIntent.FLAG_UPDATE_CURRENT));

    How I disable the alarm when the user clicks on disable...

    sender = PendingIntent.getBroadcast(this, 1, intent, 0);
    alarmManager.cancel(sender);


    I have added the Alarm receiver in manifest file like below.
    <receiver
    android:name="com.sign.android.myscheduler.app.AlarmReceiver"
    android:enabled="true"
    android:exported="true" >
    </receiver>

    Please help....

Similar Threads

  1. Replies: 7
    Last Post: 04-19-2014, 01:42 PM
  2. Did I really just get Banned from the Google+ Community?
    By HeCareth in forum The Android Central Lounge
    Replies: 1
    Last Post: 04-17-2014, 12:52 AM
  3. Where is the extreme power saving mode?
    By miggdmac in forum HTC One (M8)
    Replies: 4
    Last Post: 04-16-2014, 10:10 PM
  4. Re ": Android OS for large tablet devices"
    By Niraj211 in forum General News & Discussion
    Replies: 4
    Last Post: 04-16-2014, 07:59 AM
  5. Has anyone had difficulty with the 16 GB of storage?
    By Oldoobie in forum Samsung Galaxy S5
    Replies: 7
    Last Post: 04-15-2014, 02:22 PM

Posting Permissions