capacitor-community / background-geolocation

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

Geolocation not work if communication is disabled #98

Closed machao81 closed 1 year ago

machao81 commented 1 year ago

Describe the bug Geolocation does not work when communications (mobile network and/or WIFI) are not activated on my android devices. I receive the following message in the traces "Location not available" I do not have lot of time to follow this subject. So sorry in advance if i don't answer quickly.

To Reproduce Steps to reproduce the behavior:

Expected behavior Expected that geolocation events occurred in every situation.

Smartphone (please complete the following information):

Additional context i will update this post when i have time and when i test on other device like iphone or Android lower version

diachedelic commented 1 year ago

I doubt a change to this plugin will fix the problem. But if you find a solution, please let me know.

machao81 commented 1 year ago

I doubt a change to this plugin will fix the problem. But if you find a solution, please let me know.

Why this plugin don't work with no data mobile? do you have an idea?

diachedelic commented 1 year ago

The only thing I can think of is that the FusedLocationProviderApi, which we rely on, uses Google Location Services and they somehow require mobile data. But there is nothing in the plugin that directly uses mobile data.