By: Cameron Mace
With our Android Places Plugin, quickly add in-app search with only four lines of code. Your users can search addresses and place names within your app so it’s easy to find what they’re looking for without kicking out to other apps. They can plan a date, find a restaurant, or meet-up with friends, all in one interface.
As the user types, place predictions display immediately along with any previously searched destinations, and you can access metadata like websites, addresses, and contact information. Enable users to define their home, work, and favorite places, so when they search, they can access these locations without actively typing their names.
Intent intent = new PlaceAutocomplete.IntentBuilder()
.accessToken(Mapbox.getAccessToken())
.build(AutocompleteLauncherActivity.this);
startActivityForResult(intent, REQUEST_CODE_AUTOCOMPLETE);
The Places Plugin allows you to customize the look and feel to match your brand, and you can filter results to show places only relevant to your app. So if you’re a dating app, you might rank restaurants, coffee shops, and night-life over other business listings.
In cases where the user chooses a location on the map using coordinates rather than addresses, the Places Plugin supports reverse geocoding through the Place Picker function. Just like in-app search, you can fully customize the look and feel.
Get started with our Places Plugin and add in-app search to your app with four lines of code. Have questions? Reach out to our sales team.
In-app search for Android was originally published in Points of interest on Medium, where people are continuing the conversation by highlighting and responding to this story.