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.

http://iosapi.xamarin.com/index.aspx?link=m%3axamarin.forms.device.starttimer(system.timespan%2csystem.func%7bsystem.boolean%7d)


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -