Dynamic intervals in SetRepeating() method Android [Xamarin.Forms]

只谈情不闲聊 提交于 2020-04-30 07:01:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!