Skip to content Skip to sidebar Skip to footer

Google Places Autocomplete Api Gives Api_not_connected Error In Instant Apps Configuration

I am trying to add Google Places AutoComplete API to my Android Instant Apps project. I followed this sample to implement the API. My PlacesAdapter class: package net.epictimes.uvi

Solution 1:

I decided to connect the API using the GoogleApiClient:

GoogleApiClient.Builder(this)
                .enableAutoManage(this, this)
                .addApi(Places.GEO_DATA_API)
                .build()
                .connect()

But the connection attempt failed with status code API_UNAVAILABLE in instantapp configuration.

In the docs, API_UNAVAILABLE means that the API is not available for Instant Apps:

When debugging an instant app that uses a Google Play services library other than those included in the list above, you may see the API_UNAVAILABLE error in your debugging output. The API_UNAVAILABLE error indicates that the library has not been adapted for usage in Android Instant Apps.

So I dropped the Places AutoComplete and continued with something similar like geocoding.

Post a Comment for "Google Places Autocomplete Api Gives Api_not_connected Error In Instant Apps Configuration"