Code example for LinkedBlockingDeque

Methods: add

		int retValue = super.onStartCommand(intent, flags, startId);
        mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
		if (checkPreferences()) { 
            if (mMessages == null) {
                mMessages = new LinkedBlockingDeque<String>();
			String message = "";
			try { 
				message = buildNotificationString(intent.getStringExtra("originatingAddress"), intent.getStringExtra("messageBody"));
			} catch (NullPointerException e) {
				//error in getting Intent's extra strings, cannot continue 
				return retValue;
            Log.v(TAG, "Added message to queue");
            if (mTts == null) {
                Log.v(TAG, "Creating new TTS");
                mTts = new TextToSpeech(this, this);
Stop searching for code, let great code find you!  Add Codota to your java IDE