Finding Current Location in android

后端 未结 5 1333
再見小時候
再見小時候 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 14:20

    Location is acquired asynchronously. You need to register a LocationListener with your LocationManager, whose onLocationChanged(Location l) will be called whenever a new location information is available.

提交回复
热议问题