5

In my code I am trying to display a list of 5 suggested addresses if the user inputs a string in an EditText.

I use

List<Address> addressList = geocoder.getFromLocationName(searchString, 5);

with searchString being the string that the user entered in the EditText. The results however are always 1 instead of 5. I tried with many city/place names and it only displays to me one suggestion.

I would like to get more than just one result. Can I get help on this?

Bayan
  • 93
  • 1
  • 10
  • You may need to switch to the Places API. – CommonsWare Jan 13 '19 at 20:06
  • 1
    Thanks for the suggestion. However, I am programming this task for a company and the Places API has usage limits so it's not gonna be nice. Also, the results format from Geocoder's method are exactly what I need. – Bayan Jan 13 '19 at 21:07

0 Answers0