background-geolocation icon indicating copy to clipboard operation
background-geolocation copied to clipboard

Problem getting geolocation after one hour

Open cdiazp-sacyr opened this issue 1 year ago • 2 comments

Describe the bug After resolved the problem of Android stopping the application after five minutes in the background: https://github.com/capacitor-community/background-geolocation/issues/89 Now Android stops the application in the background after approximately one hour. For this reason, we have used foreground plugin to show a notification that makes Android reactivate the app, but it does not work.

To Reproduce Steps to reproduce the behavior:

  1. Start app
  2. Send coordenates to an API
  3. We send the application to de background
  4. After an hour, Android stops the calls to the API
  5. If I get the application in foreground, the flow restart again

Expected behavior We need to send coordenates to the API throughout the time

Smartphone (please complete the following information):

  • Device: Any Android Device
  • OS: Android 14

cdiazp-sacyr avatar Oct 14 '24 10:10 cdiazp-sacyr

Can you reproduce the problem when you run the Example app on your device? https://github.com/capacitor-community/background-geolocation/tree/master/example

diachedelic avatar Oct 14 '24 10:10 diachedelic

The Example app does not send anything to an API, but it will show you if location updates pause (or stop being sent to the WebView).

diachedelic avatar Oct 14 '24 10:10 diachedelic