Code example for LinkedBlockingQueue

Methods: clear

0
	 
	@Override 
	public void onDestroy() { 
		super.onDestroy(); 
		if (workerThread != null) workerThread.stop();
		queue.clear();
        Utils.shutdownHttpClient(httpClient);
	} 
 
	private void sendNotification(String title, String message) { 
        Notification notification = new Notification(
        		R.drawable.icon, message + " " + title, System.currentTimeMillis()); 
         
        PendingIntent contentIntent = PendingIntent.getActivity(
        		this, 0, new Intent(this, Main.class), Intent.FLAG_ACTIVITY_NEW_TASK); 
 
        notification.setLatestEventInfo(this, title, message, contentIntent); 
         
        notificationManager.notify(R.string.app_name, notification); 
    }