Add a Place Autocomplete widget to your Android app

  Рет қаралды 26,990

Google Maps Platform

Google Maps Platform

Күн бұрын

Learn how to bring the power of Place Autocomplete to get predictions for places such as businesses, addresses and points of interest as the user types. This Geocast covers three methods for adding Place Autocomplete to your app depending on how you want your UI to appear.
See sample code to use an AutocompleteSupportFragment for a pre-built place search dialog, launch an intent from another UI element, or use findAutocompletePredictions programmatically to fully customize your own UI.
Place Autocomplete in Places SDK for Android documentation → goo.gle/3b0Iky0
Alternate version for web development:
Place Autocomplete for your website → goo.gle/32UFhE3
Watch more Geocasts → goo.gle/Geocasts
Subscribe to Google Maps Platform → goo.gle/GMapsPl...
#Geocasts #Android

Пікірлер: 59
@GoogleMapsPlatform
@GoogleMapsPlatform 2 жыл бұрын
Subscribe to Google Maps Platform for tutorials, tips, user stories, announcements, and more! → goo.gle/GMapsPlatform
@user-np1ev4pu5g
@user-np1ev4pu5g 2 жыл бұрын
🏆👍👍
@quintinboatwright9211
@quintinboatwright9211 4 жыл бұрын
Why don't you have any support for kotlin in this video or on your documentation?
@josephmwangi1951
@josephmwangi1951 4 жыл бұрын
Been looking for this too.
@axedexango
@axedexango 4 жыл бұрын
can you found something ?
@coldkaozgaming3530
@coldkaozgaming3530 3 жыл бұрын
Anyone know why, in the XML, android:name does not recognise the class it needs to instantiate. Even though, I have checked the file path and see it there.
@vijayjangid8967
@vijayjangid8967 3 жыл бұрын
We need to declare the class or intent in android manifest also
@tater1429
@tater1429 9 ай бұрын
You guys are a terrible company. Where is the support for Kotlin???
@gonzalooviedo5435
@gonzalooviedo5435 11 күн бұрын
Flutter version please?
@tater1429
@tater1429 9 ай бұрын
what about kotlin
@jackxn5807
@jackxn5807 4 жыл бұрын
i wish i saw this video 3 days ago so i dont have to suffer for the past 3 days looking everywhere and finding codes thats was before Places got deprecated.
@anisexpert4604
@anisexpert4604 4 жыл бұрын
i wish i saw it before 20 days bcs i was suffering in finding solution for all this time , but i guess i'm still having a problem when i put a place in the box it doesn't show me all suggestions even sometimes it showes me nothing and tell me check ur network and retry but my network is perfect . do u have any solution for that !
@digvijayrana6893
@digvijayrana6893 4 жыл бұрын
@@anisexpert4604 can we use place autocomplete API without billing account
@andresfelipeyanquen7194
@andresfelipeyanquen7194 4 жыл бұрын
Hi, the second option doesnt work to limit an area, can you help me, please?
@vaos04
@vaos04 3 жыл бұрын
0:33 gave me anxiety...
@godswillomonkhodion6393
@godswillomonkhodion6393 Жыл бұрын
this method currently seems not to work anymore. on adding the fragment tag to your XML file, your design preview breaks with an error UNKNOWN FRAGMENT has anymore been able to figure this out yet?
@GoogleMapsPlatform
@GoogleMapsPlatform Жыл бұрын
It should work - try cloning the demo app from github.com/googlemaps/android-places-demos and compare your code with it. Ensure you have enabled Places API in your project, added your API key, and added the appropriate dependencies according to the "Setup" steps beginning at developers.google.com/maps/documentation/places/android-sdk/cloud-setup
@sanjayas7398
@sanjayas7398 4 жыл бұрын
Hi, the autocomplete view collapse as soon as a single character in entered ,its not accepting the input can any help me to solve this?
@GoogleMapsPlatform
@GoogleMapsPlatform 4 жыл бұрын
That doesn't sound like the expected experience. You can contact Support to get help with your implementation. Here's how: goo.gle/gmp-support-case
@oohhsito4856
@oohhsito4856 3 жыл бұрын
You need to enable billing in your account. Also check that you're using the right Key and SHA1 in case you enabled restriction.
@changlangtudangyeu
@changlangtudangyeu 2 жыл бұрын
help me please, I integrate autocomplete to my application, but it always gets error "Can't load search result"
@aritrabhattacharya7722
@aritrabhattacharya7722 3 жыл бұрын
Even after enabling billing it only returns 5 results -_-
@AbhishekSharma-tp3gx
@AbhishekSharma-tp3gx 3 жыл бұрын
I am unable to create AutoCompleteFragment Even i have created billing account plss help me🙏🙏🙏
@GoogleMapsPlatform
@GoogleMapsPlatform 3 жыл бұрын
Our support team can help! Reach out here to get someone who can help you with Place Autocomplete in Android: goo.gle/gmp-support-case
@fahadgaliwango4502
@fahadgaliwango4502 4 жыл бұрын
have used fragment with kotlin, but on clicking to start searching, the keyboard doesn't start instead I get Status{statusCode:Place Fields must not be empty , resolution:null}
@monilpanchal
@monilpanchal 4 жыл бұрын
add this before initializing the AutocompleteSupportFragment if (!Places.isInitialized()) { Places.initialize(getApplicationContext(),"your-google-api-key", Locale.US); }
@castrocastillo3714
@castrocastillo3714 4 жыл бұрын
I've once tried to click the cursor in the google map search bar with other user's google account signed into it and there was one specific place that was being autocomplete without typing any letter in it. That does mean the place was previously been visited by the user?
@GoogleMapsPlatform
@GoogleMapsPlatform 4 жыл бұрын
If you're asking about the Google Maps app, you can check if there's an answer about that in Google Maps Help forums or post this as a new question. support.google.com/maps/community
@syedfazal1202
@syedfazal1202 2 жыл бұрын
How to get query back to the fragment?
@GoogleMapsPlatform
@GoogleMapsPlatform 2 жыл бұрын
Use a PlaceSelectionListener to handle the response from the user selecting one of the Autocomplete predictions. The response will not include the user's typed query. developers.google.com/maps/documentation/places/android-sdk/autocomplete#option_1_embed_an_autocompletesupportfragment. If you want to capture the user's query, you will need to implement Autocomplete programmatically. developers.google.com/maps/documentation/places/android-sdk/autocomplete#get_place_predictions
@nicolapigozzo
@nicolapigozzo 4 жыл бұрын
Who the hell will never use the autocomplete api??!! Too much expensive... :(
@anisexpert4604
@anisexpert4604 4 жыл бұрын
why how much u need to pay to use these functions . I'm using it and they don't ask for me to pay !!!!!!
@digvijayrana6893
@digvijayrana6893 4 жыл бұрын
@@anisexpert4604 Whenever I use this API it shows that billing account is necessary. What's the solution for this.
@loicquivron5209
@loicquivron5209 4 жыл бұрын
@@digvijayrana6893 you will have 270 USD for free at start but then if you wish to continue using this, you will have to pay
@codered4896
@codered4896 4 жыл бұрын
When I set it up it works but, when I try to type something in the space it immediately takes me back to the the main activity, any ideas on how to fix?
@jackxn5807
@jackxn5807 4 жыл бұрын
in your code did you use your acutally api key that was applied on google clould platform? don't refer it from strings or any where else that you stored it..
@stevanmiladinovic4007
@stevanmiladinovic4007 4 жыл бұрын
@@jackxn5807 Why does that happen? Isn't it "unsafe" to just put the key straight into your code? Isn't that exactly what string-resources are for?
@GoogleMapsPlatform
@GoogleMapsPlatform 2 жыл бұрын
We recommend using the Secrets Gradle Plugin to protect your API keys. kzbin.info/www/bejne/jmnPioGNlLSlaNE
@abishekarjun3070
@abishekarjun3070 4 жыл бұрын
Do we need to migrate to android x to use this?
@abishekarjun3070
@abishekarjun3070 4 жыл бұрын
Or is there any lesser version of places api in which we can implement this , without using android x
@elmagnificent8550
@elmagnificent8550 2 жыл бұрын
Can this be used in flutter ?
@GoogleMapsPlatform
@GoogleMapsPlatform 2 жыл бұрын
You could host the native Android view in Flutter with this documentation: docs.flutter.dev/development/platform-integration/platform-views
@elmagnificent8550
@elmagnificent8550 2 жыл бұрын
@@GoogleMapsPlatform and the iOS ?
@roliverma5851
@roliverma5851 4 жыл бұрын
It just shows "Cant Load Search Results" for any place I search for
@rishabhsheth6087
@rishabhsheth6087 4 жыл бұрын
Faced the same issue. Solved the issue by enabling billing for the project. I hope its works for you.
@orhalachmi5110
@orhalachmi5110 4 жыл бұрын
you need to enable biliing
@Дмитрий-т8в9у
@Дмитрий-т8в9у 4 жыл бұрын
@@orhalachmi5110 how to enable it? Is it really impossible to use the Places API for free?
@anisexpert4604
@anisexpert4604 4 жыл бұрын
I'm facing the same problem , do u guys have any better solution for that like something for free bcs i just need to use it for my graduation project
@sanjayas7398
@sanjayas7398 4 жыл бұрын
@Angela Yu hi,even tough i am having the billing account i am getting the error "Cant load the search results"
@bikrampoudelcomputing2035
@bikrampoudelcomputing2035 3 жыл бұрын
how can i get only colleges name in autocomplete?
@bikrampoudelcomputing2035
@bikrampoudelcomputing2035 3 жыл бұрын
@Angela Yu But I need billing account which is very difficult for students especially who are doing college final year project. I belong to the country where there is no international payment system (though recently started 2-3 days ago). I neither have card number for free trail. Do something for me (students) :) But if I cant get only colleges' name, it will not work in my project. I think I need to type colleges name manually 😁
@GoogleMapsPlatform
@GoogleMapsPlatform 3 жыл бұрын
@@bikrampoudelcomputing2035 If your instructor requires maps and places for coursework they can apply for Education credits that can be distributed to the students in your course without requiring a payment method. developers.google.com/maps/billing/public-programs#faculty
@vinaykumarhs5509
@vinaykumarhs5509 2 жыл бұрын
The first min went well, but when they started explaining the code....🥲
How to add Place Autocomplete to your iOS App
4:54
Google Maps Platform
Рет қаралды 8 М.
The perfect imperfection of Google's Material You
15:47
David Imel
Рет қаралды 455 М.
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 38 МЛН
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 8 МЛН
Новый уровень твоей сосиски
00:33
Кушать Хочу
Рет қаралды 5 МЛН
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
How to get better predictions with Place Autocomplete
6:30
Google Maps Platform
Рет қаралды 12 М.
The ONLY Correct Way to Load Initial Data In Your Android App?
12:27
Philipp Lackner
Рет қаралды 26 М.
The Most Legendary Programmers Of All Time
11:49
Aaron Jack
Рет қаралды 568 М.
Calyx OS - The next big Android Competitor!?
12:06
Mrwhosetheboss
Рет қаралды 5 МЛН
How to add a Place Autocomplete search widget to your website
4:17
Google Maps Platform
Рет қаралды 120 М.
Why Are Open Source Alternatives So Bad?
13:06
Eric Murphy
Рет қаралды 644 М.
How to hide your API keys on Android
2:59
Google Maps Platform
Рет қаралды 38 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 716 М.
We Built an App in 24 Hours [No Code]
11:56
Raw Startup
Рет қаралды 432 М.
Why Agent Frameworks Will Fail (and what to use instead)
19:21
Dave Ebbelaar
Рет қаралды 66 М.
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 38 МЛН