We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@mcharmas Now I use the following code to get the place address, but how should I get the place name?
private fun googleLocation() { locationProvider = ReactiveLocationProvider(applicationContext, ReactiveLocationProviderConfiguration .builder() .setRetryOnConnectionSuspended(true) .build()) val locationRequest = LocationRequest.create() .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) .setNumUpdates(1) locationProvider!!.getUpdatedLocation(locationRequest) .doOnNext { latitude = it.latitude longitude = it.longitude Timber.d("latitude: $latitude longitude: $longitude") } .flatMap { location -> locationProvider!!.getReverseGeocodeObservable(location.latitude, location.longitude, 1) } .map { addresses -> if (!addresses.isEmpty()) addresses[0] else null } .map(AddressToStringFunc()) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .`as`(AutoDispose.autoDisposable(AndroidLifecycleScopeProvider.from(this, Lifecycle.Event.ON_DESTROY))) .subscribe(DisplayTextOnViewAction(location), ErrorHandler()).isDisposed }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@mcharmas Now I use the following code to get the place address, but how should I get the place name?
The text was updated successfully, but these errors were encountered: