First Time Launch Google Place Picker Take a Time

315 Views Asked by At

I am using place picker API and I didn't understand why it takes time when it is launched for the first time?
After the first run/launch, when we open it for the second time, it works fine.

Here's the code which I've implemented on a button click:

PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
try {
    startActivityForResult(builder.build(ImageStickerActivity.this), PLACE_PICKER_REQUEST);
} catch (GooglePlayServicesRepairableException e) {
    e.printStackTrace();
} catch (GooglePlayServicesNotAvailableException e) {
    e.printStackTrace();
}
1

There are 1 best solutions below

1
On

s.jain. i find the solution. Actually there is problem in the MAP Api key. if the limit is exceed from 15000 users then place picker can not open and close instantly. change your API KEy.

 <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="Your Api key..." /> 

Add this line of code in manifest file let me know if its work or not