安卓系统提供----基于google mapLocationManager locationManager (LocationManager)getSystemService(LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, new LocationListener() {
@Overridepublic void onLocationChanged(Location location) {
Log.i("Location","onLocationChanged" + location.toString());
}
@Overridepublic void onStatusChanged(String provider, int status, Bundle extras) {
Log.i("Location","onStatusChanged" + status);
}
@Overridepublic void onProviderEnabled(String provider) {
}
@Overridepublic void onProviderDisabled(String provider) {
}
});
2.百度地图-----参照百度官方文档引入so文件的方法:
在build.gradle中添加 sourceSets{ main{
jniLibs.srcDirs=['libs']
}
}