Code example for TextToSpeech

Methods: shutdown, stop

0
        @SuppressWarnings("unused") 
        public void braille(String jsonString) {
            try { 
                JSONObject jsonObj = new JSONObject(jsonString);
 
                WriteData data = WriteData.forView(mView);
                data.setText(jsonObj.getString("text"));
                data.setSelectionStart(jsonObj.getInt("startIndex"));
                data.setSelectionEnd(jsonObj.getInt("endIndex"));
                mSelfBrailleClient.write(data);
            } catch (JSONException ex) {
                Log.w(TAG, "Error parsing JS JSON object", ex);
            } 
        } 
 
        @SuppressWarnings("unused") 
        protected void shutdownInternal() { 
            mTextToSpeech.shutdown();
            mSelfBrailleClient.shutdown();
        } 
    } 
}