各位,我在android平台上用到GPS这个功能,通过GPS_PROVIDER得到的location总是null
while (location == null) {
location = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
mLocationManager.requestLocationUpdates("gps", 100000,(float) 0.1, mLocationListener);
}
也是不管用。
在2G手机上,可以通过NETWORK_PROVIDER来得到location,而在3G手机上,不管是GPS还是NETWORK都无法得到location。
在手机上安装Google地图,不能进行GPS定位,而安装百度地图,则可以。
求各位大虾指导一下。谢谢。
while (location == null) {
location = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
mLocationManager.requestLocationUpdates("gps", 100000,(float) 0.1, mLocationListener);
}
也是不管用。
在2G手机上,可以通过NETWORK_PROVIDER来得到location,而在3G手机上,不管是GPS还是NETWORK都无法得到location。
在手机上安装Google地图,不能进行GPS定位,而安装百度地图,则可以。
求各位大虾指导一下。谢谢。
哥们 获取location那个问题知道怎么解决么?