Android GeoFencing & Tracking

704 views
Skip to first unread message

dinesh

unread,
Jul 15, 2011, 8:29:28 AM7/15/11
to SimpleGeo Help, dinesh...@gmail.com
Using Simple Geo

1) Is it possible on Android to implement GeoFencing to find my
friends located in that fence and show it on the map.

2) Can we track the members and show it on the map (Current position
where they are? Ex: Family Tracker)


If it is possible? How and where can i start?

is there is reference links/documents to implement this one.

Andrew Mager

unread,
Jul 15, 2011, 11:07:43 AM7/15/11
to simp...@googlegroups.com, dinesh...@gmail.com
1.) We don't have polygon storage setup just yet, but it's on our roadmap.

2.) You can use SimpleGeo Storage to store and query point data, which could be your user's location.


Please let me know if you have any more questions!

-Andrew




--
SimpleGeo Developer Portal: http://developers.simplegeo.com
API Documentation: http://simplegeo.com/docs
Updates via Twitter: https://twitter.com/SimpleGeoAPI
Change your membership to this group: https://groups.google.com/forum/#!forum/simplegeo

Ryan Gomba

unread,
Jul 15, 2011, 11:20:04 AM7/15/11
to simp...@googlegroups.com, dinesh...@gmail.com
To add to Andrew's response,

1) If what you want is to locate users within a specified radius or bounding box, you can certainly query a Storage layer that contains the locations of your users.

What you'll want to do is create a SimpleGeo Storage layer that holds the locations of your users. Then, you'll want to create a record for each user. When a user changes location, your app will need to update the user's record with a new latitude & longitude.

At any time, you may query Storage using a radius or bounding box to find all the users within a given area. After that, it's trivial to show these users on a map.

Ryan

Ben Standefer

unread,
Jul 15, 2011, 2:24:52 PM7/15/11
to simp...@googlegroups.com, dinesh...@gmail.com
Dinesh,

You can also use SimpleGeo Context to group users by neighborhood, city, state, zip, etc.  For example, if you wanted to show which users were in a certain zip code you would do this.  When a user changes location, run their new lat/lon through SimpleGeo Context and extract the zip code the user is now in.  Update a record on your side (or their SimpleGeo Storage record) with zipcode=<their new zipcode>.  Then, when you query your database (or SimpleGeo Storage), you can say "give me users where zipcode=94103".  I believe this will accomplish what you want.

If you run a user's lat/lon through SimpleGeo Context every time they change location, you can also provide information about how their geofencing has changed.  Ie "You just went from the Marina neighborhood to the Mission neighborhood" or "You crossed state lines from California to Nevada".

-Ben
Reply all
Reply to author
Forward
0 new messages