background_locator_fixed
background_locator_fixed copied to clipboard
Background Locator starts service and closes immediately
Two cases:
- When app is running and is in background and my mobile goes in sleep mode the service goes off within minutes.
- When I have not gave them (android:stopWithTask="true") in androidManifest.xml. It should have run in background even when app is closed but in that case also the service goes off within minutes.
I am using Android device and android version is 11. In android version 13 it does not open any service.
Below is my code:
Check if battery optimization is turned on. Try turning it off.