@@ -0,0 +1,1498 @@
+package home.climax708.librecarpool;%0A%0Aimport android.os.AsyncTask;%0A%0Aimport com.google.android.gms.common.api.GoogleApiClient;%0Aimport com.google.android.gms.common.api.PendingResult;%0Aimport com.google.android.gms.location.places.Place;%0Aimport com.google.android.gms.location.places.PlaceBuffer;%0Aimport com.google.android.gms.location.places.Places;%0A%0A/**%0A * Created by maxim on 24-Feb-17.%0A */%0A%0Apublic class GetGooglePlaceTask extends AsyncTask%3CString, Void, Place%5B%5D%3E %7B%0A%0A    private GoogleApiClient mGoogleApiClient;%0A%0A    public GetGooglePlaceTask(GoogleApiClient client) %7B%0A        mGoogleApiClient = client;%0A    %7D%0A%0A    @Override%0A    protected Place%5B%5D doInBackground(String... params) %7B%0A        if (params == null)%0A            return null;%0A%0A        int paramsLength = params.length;%0A%0A        if (paramsLength == 0)%0A            return null;%0A%0A        Place%5B%5D retrievedGooglePlaces = new Place%5BparamsLength%5D;%0A%0A        PendingResult%3CPlaceBuffer%3E placesBuffer;%0A        placesBuffer = Places.GeoDataApi%0A                .getPlaceById(mGoogleApiClient, params);%0A%0A        PlaceBuffer placeBuffer = placesBuffer.await();%0A%0A        // Freezing the place object is necessary for later use since we are closing the buffer.%0A        // refer to: https://developers.google.com/places/android-api/buffers%0A        for (int i = 0; i %3C paramsLength; i++) %7B%0A            retrievedGooglePlaces%5Bi%5D = placeBuffer.get(i).freeze();%0A        %7D%0A        %0A        placeBuffer.release();%0A%0A        return retrievedGooglePlaces;%0A    %7D%0A%7D%0A

Add Place from Place ID loading task