各位,我在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定位,而安装百度地图,则可以。
求各位大虾指导一下。谢谢。

解决方案 »

  1.   

    LocationManager.GPS_PROVIDER 改为LocationManager.NETWORK_PROVIDER 试试
      

  2.   

    我也有这个问题,怎么解决呀。我是用模拟器的。就是一直null。你解决了么?
      

  3.   

    GPS的问题还不少啊,我遇到的情况是如何开启和关闭gps的问题,郁闷中呢还。再研究研究吧,不好整啊。
      

  4.   


    哥们 获取location那个问题知道怎么解决么?