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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -