我用Android手机在室外定位后,回到室内,没有了GPS信号。这里调用getLastKnownLocation返回的是上次的定位结果。实际是此时(在室内)已经没有了GPS信号。我如何刷新GPS状态?
3条回答 默认 最新
Sueyexin 2012-12-11 05:13关注如果你是在室内测试,试试既用网络有用GPS卫星(注意:从网络上得到的位置信息有时候不是100%准确)
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener); locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);and wait sometime for getting a gps fix from gps-reciver.normaly it takes 2 to 3 minutes if there is less signal strength it may take long.如果你有任何问题,请贴你的代码,这样才能方便查问题在哪里。
解决 无用评论 打赏 举报