Mohamed Shaheen
Mohamed Shaheen

Reputation: 663

Place picker automatically closes after launching

My gradle

implementation "com.google.android.gms:play-services-places:16.0.0"

My manifest

<meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/map_api_key" />

My activity calling the map

PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
        startActivityForResult(builder.build(this), PLACE_PICKER_REQUEST);

This is my logcat while running the place picker

2019-01-01 11:57:58.771 24597-24597/com.labeyh.labeyh D/ViewRootImpl@924c3c7[AddressActivity]: ViewPostIme pointer 0

    --------- beginning of system
2019-01-01 11:57:58.853 24597-24597/com.labeyh.labeyh D/ViewRootImpl@924c3c7[AddressActivity]: ViewPostIme pointer 1
2019-01-01 11:57:58.889 24597-24631/com.labeyh.labeyh V/FA: Recording user engagement, ms: 3006
2019-01-01 11:57:58.892 24597-24631/com.labeyh.labeyh V/FA: Activity paused, time: 433188100
2019-01-01 11:57:58.899 24597-24631/com.labeyh.labeyh D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=3006, firebase_screen_class(_sc)=AddressActivity, firebase_screen_id(_si)=-2529808333680378203}]
2019-01-01 11:57:58.908 24597-24597/com.labeyh.labeyh D/ViewRootImpl@924c3c7[AddressActivity]: MSG_WINDOW_FOCUS_CHANGED 0
2019-01-01 11:57:59.289 24597-24597/com.labeyh.labeyh D/InputTransport: Input channel destroyed: fd=71
2019-01-01 11:57:59.476 24597-24597/com.labeyh.labeyh D/ViewRootImpl@924c3c7[AddressActivity]: MSG_WINDOW_FOCUS_CHANGED 1
2019-01-01 11:57:59.478 24597-24597/com.labeyh.labeyh V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@c8743f1 nm : com.labeyh.labeyh ic=null
2019-01-01 11:57:59.478 24597-24597/com.labeyh.labeyh I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2019-01-01 11:57:59.483 24597-24597/com.labeyh.labeyh D/InputTransport: Input channel constructed: fd=71
2019-01-01 11:57:59.486 24597-24631/com.labeyh.labeyh V/FA: Activity resumed, time: 433188696
2019-01-01 11:58:04.489 24597-24631/com.labeyh.labeyh V/FA: Inactivity, disconnecting from the service

enter image description here

Upvotes: 2

Views: 184

Answers (1)

kundan kamal
kundan kamal

Reputation: 672

This issue will be come if your api key is incorrect or you have not enable the place api over google console.

Upvotes: 1

Related Questions