I have a Xamarin.Forms SMS based app that works great in Background using WakeLock while the device is sitting turned off on a table. Even when the device is turned off I can get the device location from another device. However, as soon as I put the device in my pocket then I get NoGPS response. Same NoGPS behavior if the proximity sensor is covered or there is total darkness. In total darkness I see device being woken while retrieving GPS Coordinates but listener returns null.
await CrossGeolocator.Current.StartListeningAsync(TimeSpan.FromSeconds(5), 5, true, null);
I am waking the device using
var PM = (PowerManager)this.GetSystemService(Context.PowerService);
WL = PM.NewWakeLock(WakeLockFlags.Full | WakeLockFlags.AcquireCausesWakeup, "Mom");
I have tried adding different WakeLockFlags but no success.
Again the App works great outside of the pocket or not in darkness.
Thank you