HaylLtd / cordova-background-geolocation-plugin

Background and foreground geolocation plugin for Cordova.
Apache License 2.0
57 stars 66 forks source link

Installation not recognized #93

Closed 3rikson closed 2 years ago

3rikson commented 2 years ago

Describe the bug A clear and concise description of what the bug is. The Background Geolocation from Mauron85, and in the new Android versions, only returns the location of the user when in foreground, in background, it returns the last location of when was in foreground, I need to have the locations when the user uses the app in background and is moving. I'm still no experienced, so sorry for any clear mistake that I didn't noticed.

To Reproduce I uninstalled the previous version and installed this one, but even it appearing in the package.json and in the list of cordova plugins, testing in the apk it doesn't looks like returns the value. I created a browser platform to verify the behavior, it shows that it is not installed, other plugins are recognized. Steps to reproduce the behavior:

  1. Uninstall the previous version of the app, and install this plugin. image image

  2. I just changed the code from previous to this one, I'm still inexperienced, so not sure if this method is correct. image

image

  1. The location is sent to an API, and the values are not arriving, the inclusion of the browser was to find some info that is not possible to have when testing the apk. image

Expected behavior The location being sent to the API even in background.

Desktop (please complete the following information): image

Smartphone (please complete the following information): Testing on mobile with Android 11

HarelM commented 2 years ago

The webview stops sending events when in the background. You need to either send them to a server or get them when returning to foreground. In either case, I'm using this plugin and it works as expected. I'll close this issue but feel free to respond to this thread. I also encourage you to look into other issues in this repo...

3rikson commented 2 years ago

Thanks for the reply HareIM and thanks for the hard work to update the plugin.

The values are send to a server and stored in a table, those are the values that I was receiving with the previous plugin image

I'll check the repo to find if people had the same issue Best regards.