capacitor-community/background-geolocation

Geolocation not work if communication is disabled

machao81 opened this issue · 3 comments

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:

  • launch geolocation, the geoloc events occurred
  • Disable network mobile and/or wifi -> instead receive the event, the trace "Location not available" is logged
  • Enable the network mobile and/or wifi -> events occurred again

Expected behavior
Expected that geolocation events occurred in every situation.

Smartphone (please complete the following information):

  • Device: Samsung A10 / Samsung tablet
  • OS: Android
  • Version : 12/13

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

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

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?

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.