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....
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....