摘要:
//获取到LocationManager对象LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); 不用去获取provider对象,直接赋值LocationManager.GPS_PROVIDER实际是就是“gps” 这样或许值有些不准确,但是速度会快很多locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1 * 1000, 1,locationListener); 阅读全文