Android Question Wait For Geofence_Added

T201016

Active Member
Licensed User
Longtime User
Hello

I would like to understand some of the GEOFENCE assumptions in the following line:

B4X:
Sub AddGeofence

rp.CheckAndRequest (rp.PERMISSION_ACCESS_FINE_LOCATION)

Wait For Activity_PermissionResult (Permission As String, Result As Boolean)

If Result Then

...

------> Wait For Geofence_Added (Success As Boolean) <------

...

End Sub


Well, if I choose Location Mode on the device,
e.g., DEVICE ONLY (specify location only via GPS) | Success = FALSE!
e.g. BATTERY SAVING (determine location via Wi-Fi, Bluetooth or cellular networks) | Success = TRUE!

Only expressed consent for the selection of the location mode
eg, HIGH ACCURACY (determine location via GPS, Wi-Fi, Bluetooth, or cellular networks) | Success = TRUE!

So only these last two location modes cause on my tested device
adding GPS position (Latitude / Longitude) to the initialized list.

My question:
- why in location mode (device only) - determining location only via GPS,
the 'Wait For Geofence_Added' function always returns a FALSE result to me?
I suppose it is narrowed only by GOOGLE itself.

Greetings.
 

josejad

Expert
Licensed User
Longtime User
Have you tested outside or inside a building? (without GPS coverage)
 
Upvote 0

T201016

Active Member
Licensed User
Longtime User
I did the tests on different phones with different versions of Android. The results are similar to those above.
 
Upvote 0

T201016

Active Member
Licensed User
Longtime User
Maybe not so much that GPS consumes more energy than the fact that
Allowing the app to use Google's location service for fast
My location determines that Anonomic location data will be collected and sent to Google.
So, I think it would be possible to use only the GPS signal instead of using the wireless network,
if there were no political restrictions on the part of Google. Yes, all signals are connected (GPS + wireless network)
gives much better location results than just the GPS signal itself. I will not deny it

However, in support of my thesis, for example, take the fact that you consent to Google's location service
for collecting location data DOES NOT turn off the use of GPS signal as an option, right?
I can still have the GPS signal turned on. So, I use energy from GPS anyway.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…