googleplacesautocomplete

java.lang.IllegalStateException: Places must be initialized

微笑、不失礼 提交于 2019-12-01 17:55:13
I was using the old Place SDK which was working fine But it is going to be depreciated and I move to new place SDK. I got keep the crashing report from a few devices. Crashes Report: Fatal Exception: java.lang.RuntimeException Unable to start activity ComponentInfo{com.islamuna.ramadan/com.google.android.libraries.places.widget.AutocompleteActivity}: java.lang.IllegalStateException: Places must be initialized. SDK version: implementation 'com.google.android.libraries.places:places:1.1.0' Even i initialize Place sample code: Places.initialize(getApplicationContext(), "mykey", Locale.US);

How to display additional information in Google Maps autocomplete suggestions?

只谈情不闲聊 提交于 2019-12-01 13:52:41
问题 I am using Google Places autocomplete to select cities by name. Currently it displays only the city name and the country it belongs to, in the suggestions drop down. I have checked and found that the "address_components" object, that gets populated when a city is selected, has additional attibutes like state/province and other parts of the address. So, it is clear that the Google's API provide additional information other than merely the city and country names. What I am trying to achieve is,

How to resolve “PLACES_API_ACCESS_NOT_CONFIGURED”

泪湿孤枕 提交于 2019-11-30 16:56:20
Friends, I was getting this error while implementing google map API in my APP. I was getting this issue: Error getting autocomplete prediction API call: Status{statusCode=PLACES_API_ACCESS_NOT_CONFIGURED, resolution=null} While searching result for these issues, I got a solution that "open google play console and enable Google Place SDK for Android". But while opening GOOGLE PLAY SDK FOR ANDROID ,I was unable to open it and got these issues as shown in figure below. Now I able to resole this issues.See my answer given below in the link to implement new SDk released. Thanks. Hi Friends I have

How to resolve “PLACES_API_ACCESS_NOT_CONFIGURED”

左心房为你撑大大i 提交于 2019-11-30 14:25:07
问题 Friends, I was getting this error while implementing google map API in my APP. I was getting this issue: Error getting autocomplete prediction API call: Status{statusCode=PLACES_API_ACCESS_NOT_CONFIGURED, resolution=null} While searching result for these issues, I got a solution that "open google play console and enable Google Place SDK for Android". But while opening GOOGLE PLAY SDK FOR ANDROID ,I was unable to open it and got these issues as shown in figure below. Now I able to resole this

Google places AutoComplete widget is generating a new Session Key per every request

淺唱寂寞╮ 提交于 2019-11-30 14:21:37
Recently, Google has updated some billing policies as part of that they've introduced SessionTokens for the Autocomplete requests. As part of that, every request in the same session will be sent the same token in the request and it's automatic if we use the AutoComplete widgets provided by Google APIs. But, I'm seeing a different token generated for every request in the same session. I'm I missing anything, please guide me. Here is the pluker for the sample, there I observed a different token generated for each keystroke. var options = { types: ['(cities)'] }; var searchBox = new google.maps

How long do the new Places API session tokens last?

走远了吗. 提交于 2019-11-27 14:04:08
I have a website that uses address autocomplete on multiple pages--address book, shipping address, billing address. With the billing changes releasing next month, we can convert the Autocomplete process to use sessions instead of individual keystrokes. ( https://cloud.google.com/maps-platform/user-guide/pricing-changes/#billing-changes ) How long is an AutocompleteSessionToken good for? The current page? An hour? Twelve? Permanently, with it counting against the limit each time it shows up in a new month? If a session token does expire, and we send that token with a request, what's the result