Get city name and postal code from Google Place API on Android

后端 未结 6 1482
醉话见心
醉话见心 2021-01-01 16:21

I\'m using Google Place API for Android with autocomplete

Everything works fine, but when I get the result as shown here, I don\'t have the city and postal code info

6条回答
  •  时光取名叫无心
    2021-01-01 17:10

    Not the best way, but the following can be useful:

     Log.i(TAG, "Place city and postal code: " + place.getAddress().subSequence(place.getName().length(),place.getAddress().length()));
    

提交回复
热议问题