Search in sources :

Example 1 with PlacesClient

use of com.google.android.libraries.places.api.net.PlacesClient in project android-places-demos by googlemaps.

the class PlaceAutocompleteActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    final String apiKey = "You API key";
    // [START maps_places_get_started]
    // Initialize the SDK
    Places.initialize(getApplicationContext(), apiKey);
    // Create a new PlacesClient instance
    PlacesClient placesClient = Places.createClient(this);
// [END maps_places_get_started]
}
Also used : PlacesClient(com.google.android.libraries.places.api.net.PlacesClient)

Example 2 with PlacesClient

use of com.google.android.libraries.places.api.net.PlacesClient in project android-places-demos by googlemaps.

the class GetStartedActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    final String apiKey = "You API key";
    // [START maps_places_get_started]
    // Initialize the SDK
    Places.initialize(getApplicationContext(), apiKey);
    // Create a new PlacesClient instance
    PlacesClient placesClient = Places.createClient(this);
// [END maps_places_get_started]
}
Also used : PlacesClient(com.google.android.libraries.places.api.net.PlacesClient)

Aggregations

PlacesClient (com.google.android.libraries.places.api.net.PlacesClient)2