[Bug]: Issue with foreground service when restarting GPS listener on Android
berhir opened this issue · comments
Bernd Hirschmann commented
Component/Nuget
GPS or Geofencing (Shiny.Locations)
What operating system(s) are effected?
- iOS (13+ supported)
- Mac Catalyst
- Android (8+ supported)
- Windows (.NET 7 Target - only Core is currently supported, BLE is coming)
Version(s) of Operation Systems
Tested with Android 10 and 13
Hosting Model
- MAUI
- Native/Classic Xamarin
- Manual
Steps To Reproduce
- Start GPS listener with
BackgroundMode = GpsBackgroundMode.Realtime
- Stop the GPS listener
- Start the GPS listener again with the same config
Expected Behavior
- When the GPS listener gets started, the Android foreground service is shown
- When the GPS listener gets stopped, the foreground service disappears
- And when the GPS listener gets started again, the foreground service is shown again
Actual Behavior
- The first step worked in my tests on both Android 10 and 13.
Android 10
2. When the GPS listener gets stopped, the foreground service does NOT disappear
Android 13
2. When the GPS listener gets stopped, the foreground service disappears
3. And when the GPS listener gets started again, the foreground service is NOT shown again
Exception or Log output
No response
Code Sample
https://github.com/berhir/ShinyLocationRestartIssue
Code of Conduct
- I have supplied a reproducible sample that is NOT FROM THE SHINY SAMPLES!
- I am a Sponsor OR I am using the LATEST stable/beta version from nuget (v3.0 stable - ALPHAS are not taking issues - Sponsors can still send v2 issues)
- I am Sponsor OR My GitHub account is 30+ days old
- I understand that if I am checking these boxes and I am not actually following what they are saying, I will be removed from this repository!
Allan Ritchie commented
Fixed in 3.11