问题
I have been seeking in forums to how to implement dynamic intervals on repeated notifications but I haven't found yet a precise answer or a "common" answer for this type of problem. My problem consist that I want to set dynamic intervals (intervals that change when the past interval has gone to be used) on my AlarmManager.SetRepeating() parameter, but as you should know SetRepeating() interval parameter is constant, so you can't change it later to other beacuse the method has already recieved one interval.
I have tried setting my AlarmManager.SetRepeating() method on my BroadcastReceiver and use an array with the dynamic miliseconds of interval but my solution simply does not worked.
Do anyone know how I can achieve my goal?
回答1:
I have found my own solution, refer to my repository on GitHub to get the source code: https://github.com/AndresQuiVal/LocalNotificationsXamarin
来源:https://stackoverflow.com/questions/59459115/dynamic-intervals-in-setrepeating-method-android-xamarin-forms