I am confused on when I should use a PendingIntent vs. a LocationListener for getting locations. If I have a service that always stays alive, is it ok to use LocationListeners?
If the component needing location updates only needs updates when the component is around -- say, an activity -- I'd use the LocationListener approach.
If the component needing location updates specifically will not be around -- say, an IntentService -- I'd use the PendingIntent. You can't use the LocationListener in this case, since there is nothing in memory to be listening for locations.
Source : When is advised PendingIntent vs. LocationListener on requestLocationUpdates?