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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -