Getting street name from Address/Location object in Android

前端 未结 6 818
滥情空心
滥情空心 2021-01-31 11:34

I\'m trying to get the street name of my current location but I can\'t seem to get it.

I use this method to retrieve the Address:

public Address getAddre         


        
6条回答
  •  無奈伤痛
    2021-01-31 12:05

    Have you tried using getAddressLine ? See here for more info on this method

    Something like this should do (untested):

    for (int i = 0; i < addresses.getMaxAddressLineIndex(); i++) {
     Log.d("=Adress=",addresses.getAddressLine(i));
    }
    

提交回复
热议问题