Skip to content

Commit

Permalink
Fixes: #166 Check location settings emits just a single value
Browse files Browse the repository at this point in the history
  • Loading branch information
mcharmas committed Oct 4, 2017
1 parent 5207480 commit 36e5b95
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ReactiveLocationProvider(Context ctx) {
/**
* Creates location provider with custom handler in which all GooglePlayServices callbacks are called.
*
* @param ctx preferably application context
* @param ctx preferably application context
* @param handler on which all GooglePlayServices callbacks are called
* @see com.google.android.gms.common.api.GoogleApiClient.Builder#setHandler(android.os.Handler)
*/
Expand Down Expand Up @@ -312,7 +312,7 @@ public Observable<ActivityRecognitionResult> getDetectedActivity(int detectInter
* Observable that can be used to check settings state for given location request.
*
* @param locationRequest location request
* @return observable that emits check result of location settings
* @return observable that emits single check result of location settings
* @see com.google.android.gms.location.SettingsApi
*/
public Observable<LocationSettingsResult> checkLocationSettings(final LocationSettingsRequest locationRequest) {

This comment has been minimized.

Copy link
@GaborPeto

GaborPeto Nov 21, 2017

Since this is returning a single result the return type should be Observable<LocationSettingsResult>

Expand All @@ -322,7 +322,8 @@ public Observable<LocationSettingsResult> checkLocationSettings(final LocationSe
public Observable<LocationSettingsResult> apply(GoogleApiClient googleApiClient) {
return fromPendingResult(LocationServices.SettingsApi.checkLocationSettings(googleApiClient, locationRequest));
}
});
})
.take(1);
}

/**
Expand Down

0 comments on commit 36e5b95

Please sign in to comment.