mcharmas / Android-ReactiveLocation

Small library that wraps Google Play Service API in brilliant RxJava Observables reducing boilerplate to minimum.
2.11k stars 312 forks source link

getCurrentPlace(null): PlaceLikelihoodBuffer always return statusCode ERROR #187

Closed gukzilla closed 6 years ago

gukzilla commented 6 years ago

return Status{statusCode=ERROR, resolution=null}

locationProvider.getCurrentPlace(null) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .doOnNext(placeLikelihoods -> hideProgress()) .map(placeLikelihoods -> { Status status = placeLikelihoods.getStatus(); if (status.isSuccess()) { return placeLikelihoods; } else { placeLikelihoods.release(); throw new IllegalStateException("Status ERROR: " + status.getStatusMessage()); } }) .map(this::convertPlaces) .subscribe(places -> mLocationAdapter.setMyPlaces(places), throwable -> Logger.e(throwable, TAG));

getPlaceAutocompletePredictions(searchQuery, null, filter) works properly What can be wrong?

mcharmas commented 6 years ago

No idea. As you can see in sources LocationProvider.getCurrentPlace wraps around getCurrentPlace GMS method call, not getPlaceAutocompletePredictions. You can see in the sources that it is just a wrapper.

gukzilla commented 6 years ago

@mcharmas I understand that the problem is in the play services. But maybe you came across this?

mcharmas commented 6 years ago

Sorry, I didn't...

yalematta commented 5 years ago

I've got the same problem! Any solutions found?