嘿,伙计们,我想知道用户位置的纬度和经度。,因此我也想要一个LocationManager.getLastKnownLocation()的替代方案。我的代码是: getSystemService(Context.LOCATION_SERVICE);// connect to the GPS location service
Location loc = lm.
这是我用来获取当前位置的代码:Criteria criteria = new Criteria//ask user to enable atleast one of the Location Providers Location location = mgr.getLastKnownLocationmgr.getLastKnownLocation(best) returns