xamarin - Run background task every X amount of time -
i start service once in awhile on platforms has checked there notification appear or not. there nuget connect platforms or examples?
you can use device.starttimer(timespan minutes)
method start background task repeat after given time span. here code example:
var minutes = timespan.fromminutes (3); device.starttimer (minutes, () => { // call method check notifications here // returning true means want repeat timer return true; });
this included xamarin forms, don't need platform specific logic.
Comments
Post a Comment