Reputation: 626
Scenario:
The user can select a time interval (such as 5h). Every 15 minutes of that interval, I'll check the current location of user and take actions depending on the location.
Question:
So, which is best?
Will I need a LocationListener
or getLastKnowLocation()
based on some Criteria should resolve?
Upvotes: 0
Views: 73
Reputation: 2132
Implement BroadcastReceiver
with AlarmManager
that setInexactRepeating
.After it handle your getLastKnowLocation()
with Criteria and send broadcast wherever you want
Upvotes: 3