use of com.google.android.gms.location.places.PlaceBuffer in project Android-ReactiveLocation by mcharmas.
the class PlacesResultActivity method onLocationPermissionGranted.
@Override
protected void onLocationPermissionGranted() {
compositeSubscription = new CompositeSubscription();
compositeSubscription.add(reactiveLocationProvider.getPlaceById(placeId).subscribe(new Action1<PlaceBuffer>() {
@Override
public void call(PlaceBuffer buffer) {
Place place = buffer.get(0);
if (place != null) {
placeNameView.setText(place.getName());
placeLocationView.setText(place.getLatLng().latitude + ", " + place.getLatLng().longitude);
placeAddressView.setText(place.getAddress());
}
buffer.release();
}
}));
}
use of com.google.android.gms.location.places.PlaceBuffer in project Android-ReactiveLocation by mcharmas.
the class PlacesResultActivity method onLocationPermissionGranted.
@Override
protected void onLocationPermissionGranted() {
compositeSubscription = new CompositeDisposable();
compositeSubscription.add(reactiveLocationProvider.getPlaceById(placeId).subscribe(new Consumer<PlaceBuffer>() {
@Override
public void accept(PlaceBuffer buffer) {
Place place = buffer.get(0);
if (place != null) {
placeNameView.setText(place.getName());
placeLocationView.setText(place.getLatLng().latitude + ", " + place.getLatLng().longitude);
placeAddressView.setText(place.getAddress());
}
buffer.release();
}
}));
}
Aggregations