Skip to content Skip to sidebar Skip to footer

Xamarin Forms Android Pie Not Getting Current Location In App Background Sleep Mode

I want to get current location, when app went into sleep mode or Background.Currently i am using > Plugin.Geolocator.CrossGeolocator.Current DLL in App OnSleep() , But Its Worki

Solution 1:

You can not just spin up a thread and expect it to keep running after the OS places the app into the background or battery saving mode.

You will have to setup an Android Service (and foreground it) at a minimum to handle your location updates.

Background Execution Limits

https://developer.android.com/about/versions/oreo/background

Foreground Services

Schedule tasks with WorkManager


Post a Comment for "Xamarin Forms Android Pie Not Getting Current Location In App Background Sleep Mode"