Open Hammad335 opened 1 week ago
But sometimes user-location-coordinates we get from geofence-lib are ambiguous or random characters as shown below
I’ve never seen that before. The logged data are from Location.toString()
but what does the actual received data look like?
Realme C21Y
Realme devices are some of the most messed up Android devices out there.
I’ve never seen that before. The logged data are from Location.toString() but what does the actual received data look like?
We upload the library logs to Firestore when a salesperson completes shift for the day. The logs are retrieved using bg.Logger.getLog(), which returns logs in string format. The 'Samples' above are extracted from these string logs.
Realme devices are some of the most messed up Android devices out there.
Even when no geofence events are triggered from the start to the stop of the plugin, the location coordinates sometimes appear ambiguous. Could it be that the geofence library is not correctly storing the location coordinates in the local database, while the phone itself is providing accurate coordinates?
Forget about what you see in the logs. I’ve never seen junk like that in over 10 years. That’s Realme responsible for that messed up logging.
Could it be that the geofence library is not correctly storing the location coordinates in the local database
Absolutely not.
even though they were in the store all day, "exit" and then "enter" events are triggered
it’s not unusual that an inaccurate location can cause a geofence event to fire (eg if the device’s location api cannot provide a location from GPS or Wifi, the last alternative is from cell tower). Particularly with low quality devices, such as Realme.
the OS is completely responsible for monitoring and firing geofences. The plug-in is only the mailman.
what radius are you providing your geofences? Increase the radius to lower the number of “false positive” events.
Your Environment
flutter doctor
):Expected Behavior
Library location coordinates should be correct
Actual Behavior
Library location coordinates are obscure
Context
We are using geofencing for stores/marts to track salesperson attendance based on the time they log in and out of the store. Occasionally, a salesperson reports that even though they were in the store all day, "exit" and then "enter" events are triggered, causing the time between exit and re-entry to be deducted from their assigned shift time.
To verify whether the salesperson was actually inside the store during their shift, we upload plugin logs to Firestore and compare the distance between the store's coordinates and the user's location coordinates. However, sometimes the user location coordinates returned by the geofence library are incorrect or appear as random characters, as shown below:
Check the values of lat/lng :
Sample 1 :
Sample 2:
Sample 3:
Debug logs