Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Geofencing API triggers enter event when already in zone

I've encountered this problem with the latest Android Geofence API. The usage is exact to the example usage. I set Geofence.GEOFENCE_TRANSITION_ENTER type geofence with 500m radius and expiration is Geofence.NEVER_EXPIRE. This works ok, but if I'm about 10 meters to latitude longitude and I set the geofence, it triggers immediately.

So am I understanding the term Geofence.GEOFENCE_TRANSITION_ENTER wrong here, shouldn't it trigger only when we are outside the zone and enter it, not when we are already in the zone?

Thanks.

like image 819
Niko Avatar asked Jul 01 '13 09:07

Niko


People also ask

What is the difference between geofencing and geolocation?

Under the right circumstances, device tracking can pinpoint a location within a few feet. Device-based geolocations play a big role in geofencing and geotargeting. A geofence is an invisible, virtual fence that triggers a response each time a geolocation-compatible device enters or exits a geofence.

What is the recommended radius for a geofence?

For best results, the minimum radius of the geofence should be set between 100 - 150 meters.

Is geofencing API free?

The API uses a pay-as-you-go pricing model. After you consume all the initial free requests, the charges are 5.00 USD per 1000 hits.

How accurate is geofencing?

App developers can use native Android and iOS location detection to power their location-based experiences and engagement. However, native geofencing technology can only deliver accuracy of around 100-200 meters.


1 Answers

Well, think of Geofences of 3D objects: 2 dimensions in space, one dimension in time. Between the checks, if a Geofence was hit, your new fence got moved into place.

However, I just save the timestamp on adding fences and ignore all hits within seconds after that.

like image 113
flx Avatar answered Sep 27 '22 21:09

flx