How about using this awesome library? https://github.com/patloew/RxLocation
add this to build.gradle
compile 'com.patloew.rxlocation:rxlocation:1.0.4'
you can use this snippet from the above library to subscribe to location changes, I believe this is the easiest way
// Create one instance and share it RxLocation rxLocation = new RxLocation(context); LocationRequest locationRequest = LocationRequest.create() .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) .setInterval(5000); rxLocation.location().updates(locationRequest) .flatMap(location -> rxLocation.geocoding().fromLocation(location).toObservable()) .subscribe(address -> { /* do something */ });
source share