Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Xamarin.Forms Device Timer Issue on iOS

$
0
0

Hello,

The code below works on Android. However, on iOS the timer does not get triggered.

Anyone aware of any iOS gotchas in this case?

Thanks!

    private void ScheduleSynchronizeData()
    {
        Device.StartTimer(TimeSpan.FromMinutes(ApplicationSettings.DataSynchronizerTimespanMinutes), () =>
        {
            System.Threading.Tasks.Task recurringTask = new System.Threading.Tasks.Task(() =>
            {
                SynchronizeData();

                ScheduleSynchronizeData();
            });

            recurringTask.Start();

            return false;
        });
    }

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>