Yukams / background_locator_fixed

A Flutter plugin for updating location in background.
MIT License
50 stars 102 forks source link

Background Locator starts service and closes immediately #96

Open MS07062000 opened 1 year ago

MS07062000 commented 1 year ago

Two cases:

  1. When app is running and is in background and my mobile goes in sleep mode the service goes off within minutes.
  2. 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: code

ranahyder87 commented 1 year ago

Check if battery optimization is turned on. Try turning it off.