Skip to content

There are many apps which shows how to create and monitor geofencing, but i couldn't find any resource which tells the app whether user dwells in a geofence. As soon as geofence is created app get to know user is in the fence, but what about after 30mins or 1 hour?

License

Notifications You must be signed in to change notification settings

SkyTreasure/am-i-in-the-geofencing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

am-i-in-the-geofencing

There are many apps which shows how to create and monitor geofencing, but i couldn't find any resource which tells the app whether user dwells in a geofence. As soon as geofence is created app get to know user is in the fence, but what about after 30mins or 1 hour?

What Have I Done Here?

I am populating the geofence in the main activity when clicked on Add Geofence. This is fork from google sample project. I have edited on top of that. I am using .setLoiteringDelay(1000 * 60 * 5) , which delays notifying for 5mins. It notifies only if user dwells in the geofence for 5mins else it won't. Once i get the notification, i am removing that particular geofence and adding the same geofence with setLoiteringDelay(5mins). By this way i can check if user dwells in the same geofence or not. This is not the right way i feel but i cldn't find any other better solution as of now.

About

There are many apps which shows how to create and monitor geofencing, but i couldn't find any resource which tells the app whether user dwells in a geofence. As soon as geofence is created app get to know user is in the fence, but what about after 30mins or 1 hour?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages