Get Map address or Location Address in Android

前端 未结 3 1858
我寻月下人不归
我寻月下人不归 2020-12-16 04:12

I am writing an app that requires to get the current map location. My Map file works fine by it self, but I need to get the address (see addressString below at

3条回答
  •  一向
    一向 (楼主)
    2020-12-16 04:47

    Either pass the address to your second Activity in the Intent, or if you need to do lookups from your second Activity, just call Geocoder from there.

    If you're somehow instantiating the above class (GetMapActivity) from your second Activity and calling the getAddress method, that won't work.

提交回复
热议问题