How can I setup multiple alarms in Android?

Ok, when you set an PendingIntent, you’re supposed to assign it a unique ID to it, incase you want to identify it later (for modifying/canceling it) static PendingIntent getActivity(Context context, int requestCode, Intent intent, int flags) //Retrieve a PendingIntent that will start a new activity, like calling Context.startActivity(Intent). static PendingIntent getBroadcast(Context context, int requestCode, Intent … Read more

Android AlarmManager after reboot

I’m not sure if I understand the boot receiver and how to then restart all the alarms. Just call your code to call setRepeating() (or whatever) on AlarmManager. For example, in this sample project, PollReceiver is set to receive BOOT_COMPLETED. In onReceive(), it reschedules the alarms: package com.commonsware.android.schedsvc; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import … Read more