Code example for BlockingQueue

Methods: isEmpty

0
			return; 
		} 
		getSensorManager().unregisterListener(sensorListener);
		handler.removeCallbacks(sendDataRunnable);
		//senderTimer.cancel(); 
		if (!recentEvents.isEmpty()) {
			sendProbeData(); 
		} 
	} 
	 
 
	@Override 
	public void sendProbeData() { 
		Log.i(TAG, "RecentEvents before send:" + recentEvents.size());
		if (!recentEvents.isEmpty()) {
			Bundle data = new Bundle();
			List<SensorEventCopy> events = new ArrayList<SensorEventCopy>();
			recentEvents.drainTo(events);
			 
			if (!events.isEmpty()) {
				Sensor sensor  = events.get(0).sensor;