|
在安全帽中加了一个通过GPS模块获取位置信息的服务,服务启动到首次获取到GPS信息差不多半小时,获取到20几条GPS信息后又获取不到了信息了,而且安装“GPS测试仪”这样的app也无法定位。请问如何解决这个问题,谢谢!
locationManager的定义如下:
locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
locationManager.addGpsStatusListener(listener);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 1, this); |
|