-1
我想在android中使用手机ip(任意类型)获取lat和long,我不想启用GPS或位置,我尝试了很多例如,但无法得到确切的结果。有没有什么办法可以在android中使用手机ip地址获取纬度和经度
我想在android中使用手机ip(任意类型)获取lat和long,我不想启用GPS或位置,我尝试了很多例如,但无法得到确切的结果。有没有什么办法可以在android中使用手机ip地址获取纬度和经度
,如果你想使用蜂窝网络locatio使用NETWORK_PROVIDER
提供商
LocationManager locationManager;
String svcName = Context.LOCATION_SERVICE;
locationManager = (LocationManager)getSystemService(svcName);
String provider = LocationManager.NETWORK_PROVIDER;
Location l = locationManager.getLastKnownLocation(provider);
[从IP地址的经度和纬度值(可能的重复http://stackoverflow.com/questions/2663371/longitude-和纬度值,从IP地址的) –