user727374
user727374

Reputation: 167

android, check gps position if near/close to certain position

I've got sqlite database/table with gps locations (latitude and longitude).

Now I need the gps to check every few seconds if I'm near, so close to one of the positions within my database.

what would be the best/easiest way to do this? Can anyone give some guildlines or maybe an example/turturial on how to do this?

Upvotes: 1

Views: 2205

Answers (1)

Patrick Kafka
Patrick Kafka

Reputation: 9892

Using the Location Managers Proximity Alerts would be your best bet, you can set an alert for each location in your table and then catch the intent when they are fired.

These are much more battery efficient than manually hitting gps on some interval.

Here is one example to get the idea.

Upvotes: 3

Related Questions