There is the possibility to start retrieving notifications from a LocationManager with the following method:
requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener, Looper looper)
Documentation explains attributes with these words:
provider the name of the provider with which to register
minTime minimum time interval between location updates, in milliseconds
minDistance minimum distance between location updates, in meters
listener a LocationListener whose onLocationChanged(Location) method will be called for each location update
looper a Looper object whose message queue will be used to implement the callback mechanism, or null to make callbacks on the calling thread
I cannot understand well the behaviour of the class (of the looper) if I'd like to start receiving updates with this method.
Furthermore, I am creating a library around the class LocationManager and, before of performing the normal behaviour, I need to do some other work. Than what I need is to start receiving updates on a library's LocationListener and than perform the normal behaviour only if some conditions are verified.
In order to do this I need to know how to simulate the behaviour that would have the LocationManager if the user started to receive updates with the overmentioned method.
I hope I am clear. Can someone help me? Thanks!