Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - How to retrieve list of registered geofences

Tags:

How can I determine all geofences registered for an application?

After registering GeoFences with LocationClient.addGeofences(),I waited for onAddGeofencesResuls()(which returned SUCCESS) and tried to use LocationClient.getTriggeringGeofences(intent) with the same intent I used for registration, but I only got null.

like image 949
Flo Avatar asked May 19 '13 06:05

Flo


People also ask

What is the limit on the number of Geofences for each app?

Note: On single-user devices, there is a limit of 100 geofences per app. For multi-user devices, the limit is 100 geofences per app per device user.

What are Android Geofences?

Geofencing is a location-based service that sends a notification to smartphone users who enter a defined geographic area. A geofence is a virtual barrier. Example: Some companies send promotions to customers' smartphones when they enter a store, mall or neighborhood.

Can you do geofencing on your own?

Building your own geofence solution seems easy enough: find the point of interest you want to geofence, find the latitude and longitude point it corresponds to, identify the precise boundaries in the real world the fence corresponds to, make sure the location sensors in your app are tuned just right..


1 Answers

I assume you are trying to compare the registered geofences with the ones that you have persisted in your own database.

I tried to do that as well with my app, but it seems like the API hints that this is not the way to go. So what I do now is just to simply register geofences, it will automatically replace those that I have registered before. And when some that I have registered fires, and I am supposed to remove them, I will remove them in the firing Intent.

Another possibility is to register all the geofences to have 24 hours time limit, and have the code register the geofences at least once everyday.

like image 149
Phuah Yee Keat Avatar answered Sep 27 '22 22:09

Phuah Yee Keat