Finding Current Location in android

后端 未结 5 1399
再見小時候
再見小時候 2021-01-24 13:51

I am trying to find current location, and this is my code.

 LocationManager mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);        
           


        
5条回答
  •  不要未来只要你来
    2021-01-24 13:58

    Make sure you are running the app in the real device not in the emulator. Also your device should be data enabled.

    Also give uses:permission in the Menifest file. FINE_LOCATION

提交回复
热议问题