Update location from time to time when an application is running in the background

Asked

Viewed 65 times

0

I have an app that should save the user’s location every 1 minute. I created a service running in the background that does this. While the screen is on and the application is in the foreground, it works perfectly. But if it goes to the background, the application stops saving. I read that there was an update on android 8 that limits the geolocation call when the application is in the background. Is there any way I can continue saving the location with the 1 minute periodicity even if the application is in the background or the screen is off?

1 answer

0

  • Thanks for the answer, I tested here and even saved, but very few times, not respecting the periodicity. Is there any way to really save 1 and 1 minute?

  • Tested it using what?

  • startForegroundService and Schedule task, both work but partially, even call, but not at the exact frequency I want

Browser other questions tagged

You are not signed in. Login or sign up in order to post.