capacitor-community / background-geolocation

A Capacitor plugin that sends you geolocation updates, even while the app is in the background.
MIT License
190 stars 57 forks source link

Problem getting geolocation after one hour #126

Open cdiazp-sacyr opened 5 days ago

cdiazp-sacyr commented 5 days ago

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):

diachedelic commented 5 days ago

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 commented 5 days ago

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).