Android Auto Place Suggestion ( using Google APIs)

Updated 17 June 2018

Save

Hi, in this blog we will learn how we can implement the auto place suggestion feature in our android application and make our application more efficient.

I will show you how we can achieve something like in the working of the Google maps search bar.

See the image below

 

Implementing something like this is super easy,  all you need to do is follow this article.

Things you need to get started :

  1.  Android Studio
  2. Google Developer Account
  3. Firebase Account

Before you start coding :

After these initial steps, you are good to start writing code.

APPROACH :

  1. We are using the AutoCompleteTextView to get what user types and will display the suggestions accordingly.
  2.  We need to create the adapter for the AutoCompleteTextView
  3. Finally, we will display the result selected by the user.

CODE :

activity_main.xml file

 

MainActivity.java

PlaceAutoCompleteAdapter.java

And With this, you will now be able to suggest places within your application.

For better understanding try creating a small demo project first using these files only.

Keep coding and Keep Sharing 🙂

 

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home