Skip to content Skip to sidebar Skip to footer

Tracking User Location

Problem: The user can choose how long and when start to track your locaton (Like today from 08:00 to 16:00). So during this interval my application will listen for the location eve

Solution 1:

You don't need to register a Service for this. You can use Mak Murphy's cwac-locpoll library.

This is a short description of the library taken from the page linked above. You'll also find code examples there.

You simply set up an AlarmManager alarm to contact LocationPoller on whatever frequency you wish, and it will handle all of the location work from there, sending you the results via a broadcast Intent. Your BroadcastReceiver can then use the location data as needed.

Post a Comment for "Tracking User Location"