Hi all,
With the release of Oreo/Android 8.0, I'm wanting to replace my GPS foreground service with a scheduled job.
I've looked at the Xamarin Example for Job Scheduler, and honestly I find it quite confusing.
Here is all I want to do:
- User taps a button
- A job is created and scheduled.
- The job is called instantly, and every 30 seconds afterwards until the user taps the button again
The job will be the replacement for my GPS service (which implementes ILocationListener).
Could anyone help clear up what I need to do to achieve this?
I have tried .SetPeriodic(30000), which doesn't seem to work on my test device running Oreo.
The example uses .SetMinimumLatency() and .SetOverrideDeadline() to set some sort of schedule range. Can I set both of these to 30000 (30 seconds) to achieve what I need?
The example uses handlers and passes parameters, etc. Is this required for a Job Scheduler? There's a lot going on for a basic example project, and I'm just getting confused about the requirements.
Thanks in advance, hoping someone can help me clear this up a bit.
Cheers.