How to show current location of user while open my app

寵の児 提交于 2019-12-11 07:01:10

问题


I want to make an app, when user open my app user will get their current location in my app and while user change their location it will also update after some specific time. I got solution of changed location while user change their location but i need to show current location of user while user open my app.


回答1:


googleMap.setMyLocationEnabled(true);
Location myLocation = googleMap.getMyLocation();

These are the the key lines to get current location.

for more info ,refer these tutorials: android show current location on map using google maps api

and how to get current location in google map android



来源:https://stackoverflow.com/questions/42198041/how-to-show-current-location-of-user-while-open-my-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!