Hi Sir
I have implement the alarm manager in project. I have set the multiple
alarm at same time. Suppose I have set the five alarms but 4 alarms has
fired out of 5 or I have set 3 alarms but 2 alarms has fired. Can you give
me some advice how to solve this problem?
CODE:
private void setAlarm(Calendar targetCal) {
// *********change Request code
RQS_1 = (int) System.currentTimeMillis();
// Note Declare AlarmReciever in Manifest otherwise Alarm will not
work
// ********************************************
Intent intent = new Intent(getBaseContext(), AlarmReceiver.class);
intent.putExtra("ID", String.valueOf(insert_id));
intent.putExtra("Time", mTime);
PendingIntent pendingIntent = PendingIntent.getBroadcast(getBaseContext(),
RQS_1, intent,0);
AlarmManager alarmManager = (AlarmManager)
getSystemService(Context.ALARM_SERVICE);
// ************************use 24*3600*1000 for repeating after 24//
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,targetCal.getTimeInMillis(),
24 * 3600 * 1000, pendingIntent);
//alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP,targetCal.getTimeInMillis(),
24 * 3600 * 1000, pendingIntent);
}
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/7dc26ba2-43ed-48de-b092-d4af992cd876%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.