Using Xamarin Droid, i have created an alarm application. Setting alarm for the particular time was worked good. when i try to repeat the alarm for the particular time interval, it fails to alarm at the particular time. the application needs to alarm even the application in sleep. The below code was i tried in Xamarin Droid project for setting and repeating alarm. please direct me in right way to achieve my solution for repeating alarm!.
Setting alarm for particular time:
manager.Set(AlarmType.ElapsedRealtime, SystemClock.ElapsedRealtime() + 60 * 1000 * int.Parse(notifytime), pendingIntent);
My need is to repeat the alarm for every 15 min from the alarm rang.
manager.SetRepeating(AlarmType.ElapsedRealtimeWakeup, SystemClock.ElapsedRealtime()+10, AlarmManager.IntervalFifteenMinutes, pendingIntent);
Thanks in advance.
change this line...
to
also add this
to your AndroidManifest.xml file as #Avi Cherry said !!
schedule a repeating alarm