I use the AlarmManager in my Android app to send notifications periodically. It works like a charm in versions before Android 6.0. But in Android 6.0 it does not send the notifications anymore.
Now I've read some articles mentioning that Android 6.0 is restricting apps more when the device is not used actively. Does anyone here experience the same problem with alarms?
The app is implemented in F# and this is the code that actually sets an alarm:
let alarmManager = context.GetSystemService(Context.AlarmService) :?> AlarmManager let intent = new Intent(context, this.Class) let pi = PendingIntent.GetBroadcast(context, 0, intent, PendingIntentFlags.UpdateCurrent) alarmManager.Cancel(pi) //TODO: in android 6.0 this seems to cause problems does not work alarmManager.SetRepeating(AlarmType.ElapsedRealtimeWakeup, (int64) 0, AlarmManager.IntervalFifteenMinutes, pi)