Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to add Geofence in Android because "network location is disabled"

I'm attempting to add a geofence to an Android application. I noticed the following in the logs:

07-04 11:41:19.201 1945-2271/com.google.android.gms.persistent W/GeofencerStateMachine: Ignoring addGeofence because network location is disabled.

I also noticed that when I enable "High accuracy" mode in the system settings, it works (This is described as GPS, Wi-Fi, Bluetooth, or cellular networks). It was previously on "Device only" mode, which is GPS only.

Is this the expected functionality for geofences? Will they only work if the users have their device in "High accuracy" mode?

enter image description here

like image 525
zundi Avatar asked Jul 09 '18 20:07

zundi


People also ask

Does geofencing work if location is off?

Even with your location tracking turned off, a geofence can still establish your general location through your device's unique IP address.

Does geofencing require GPS?

Passive geofences are always on; they rely on Wi-Fi and cellular data instead of GPS or RFID and work in the background. A sporting event can use geo-fencing to create a temporary no-fly zone that prevents drones from crossing a defined perimeter.


1 Answers

First of all for High accuracy mode is necessary for all aspect of the locations even Google Map also Use this mode nowadays.

So Geofencing combines awareness of the user's current location with awareness of the user's proximity to locations that may be of interest. To mark a location of interest, you specify its latitude and longitude. To adjust the proximity for the location, you add a radius. The latitude, longitude, and radius define a geofence, creating a circular area, or fence, around the location of interest. That's why its necessary for accurate location High accuracy Mode is necessary. Here is the official Doc

Secondly according to Documentation reliable data connection required because Geofence depends upon on it. According to this its dependent on Reliable data connection.

Depending on how a geofence is configured it can prompt mobile push notifications, trigger text messages or alerts, send targeted advertisements on social media, allow tracking on vehicle fleets, disable certain technology or deliver location-based marketing data. Moreover Detail about geofencing please read this.

like image 106
Tanveer Munir Avatar answered Sep 24 '22 18:09

Tanveer Munir