delight-im / Android-SimpleLocation

Utility class for easy access to the device location on Android
Apache License 2.0
200 stars 75 forks source link

Location not updated in background service #19

Closed kulwindersingh22 closed 6 years ago

kulwindersingh22 commented 6 years ago

Hi, I am using this in my background service.It is working perfectly fine when we are in app but when app is in background it work for 3-5 times then it start showing same location again and again. Please help me as early as possible.

ocram commented 6 years ago
  1. What Android version?
  2. Emulator or real device (which manufacturer)?
  3. What configuration do you use this library with? Can you show how you create and use the instance?
  4. What type of background service? How is it created?
  5. Are you sure the background service is still running after that specified duration?
kulwindersingh22 commented 6 years ago

android version 7.0. model no=redmi note 4.

yes i am sure service running in background because i am getting output in log.

depedency i am using for simplelocation is v1. 0.1

On 08-Nov-2017 11:17 PM, "Marco" notifications@github.com wrote:

  1. What Android version?
  2. Emulator or real device (which manufacturer)?
  3. What configuration do you use this library with? Can you show how you create and use the instance?
  4. What type of background service? How is it created?
  5. Are you sure the background service is still running after that specified duration?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/delight-im/Android-SimpleLocation/issues/19#issuecomment-342898050, or mute the thread https://github.com/notifications/unsubscribe-auth/Af7PqbzvrMYZqBgS5Ktgg_3vSm9awCKtks5s0ekxgaJpZM4QV5LU .

kulwindersingh22 commented 6 years ago

hi, there is a issue with my phone setting after changing it location start updating.

On 08-Nov-2017 11:17 PM, "Marco" notifications@github.com wrote:

  1. What Android version?
  2. Emulator or real device (which manufacturer)?
  3. What configuration do you use this library with? Can you show how you create and use the instance?
  4. What type of background service? How is it created?
  5. Are you sure the background service is still running after that specified duration?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/delight-im/Android-SimpleLocation/issues/19#issuecomment-342898050, or mute the thread https://github.com/notifications/unsubscribe-auth/Af7PqbzvrMYZqBgS5Ktgg_3vSm9awCKtks5s0ekxgaJpZM4QV5LU .

ocram commented 6 years ago

Thank you!

So has this problem been solved then? If so, could you explain the setting that you needed to change in more detail? That could help others in the future. Thanks!

kulwindersingh22 commented 6 years ago

In Redmi note 4 there is a system default app "security" click on that app then go to battery option. In battery option click on battery saver option then search for the app created by you click on app then change it to the no restriction option. After this app will start working.

On 09-Nov-2017 3:49 AM, "Marco" notifications@github.com wrote:

Thank you!

So has this problem been solved then? If so, could you explain the setting that you needed to change in more detail? That could help others in the future. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/delight-im/Android-SimpleLocation/issues/19#issuecomment-342980115, or mute the thread https://github.com/notifications/unsubscribe-auth/Af7PqXRTwOff-MDoFKOnHbRr0ILfhMytks5s0ijvgaJpZM4QV5LU .

ocram commented 6 years ago

Thanks a lot for sharing that solution!

I knew it must be something like that, which other manufacturers like Huawei have as well, but I didn't know what exactly Xiaomi does.