This will give you (skip) all address bar matches. If you just need the first match, make sure the address .size () is different than 0, then take address.get(0);
In my use, I get all matches and show them as parameters. Then the user clicks one and selects the GPS location.
Geocoder geocoder = new Geocoder(getBaseContext()); List<Address> addresses; try { addresses = geocoder.getFromLocationName("Example StreeT, UK, DNFE", 20); for(int i = 0; i < addresses.size(); i++) {
source share