Code example for GpsStatus

Methods: getSatellites

0
	@Override 
	public void onGpsStatusChanged(int event) {
//		Log.i(System.currentTimeMillis() + TAG, "GPS status changed!"); 
		if (event == GpsStatus.GPS_EVENT_SATELLITE_STATUS) {
			GpsStatus gpsStatus = locationManager.getGpsStatus(null);
			if (gpsStatus.getSatellites().iterator().hasNext()) {
				// got at least one GPS satellite 
//				Log.i(System.currentTimeMillis() + TAG, 
//						"Received at least one Satellite signal!"); 
				locationManager.removeGpsStatusListener(this);
				long crtTime = System.currentTimeMillis();
				stopperExecutor.cancel(stopperId);
				stopperId = stopperExecutor.schedule(crtTime
						+ GPS_WAIT_TIME_MAX - (crtTime - initTime),
						gpsMeasureStopper);
			} 
		} 
	} 
 
	@Override