TTS - leaked ServiceConnection
<p>I am using the TTS in my APP. During onPuase method, I use the following code to stop the engine. The problem is whenever I pause the activity say using home button, I get the error as I have pasted in the log cat section. I understand from the log cat (Activity com.example.DragDrop.PlaySeries has leaked ServiceConnection ) the problem is due to some leakage. However the issue is not stoping my app or disturbs any functionality. But I would like to know the seriousness of this issue and how to avoid this ?</p>

<p>Please help  </p>

<pre><code>protected void onPause() {
    // TODO Auto-generated method stub
    super.onPause();   
    Log.i("PlaySeries", "In pause play series");
    if(tts !=null){
        Log.i("PlaySeries", "In pause play series");
        tts.stop(); 
    //  tts.shutdown();
    }
}

@Override
protected void onDestroy() {  
    //Close the Text to Speech Library
    if(tts !=null){
        Log.i("PlaySeries", "In pause play series");
        tts.stop(); 
        tts.shutdown();
    }
    super.onDestroy();
}
</code></pre>

<p>and in onCreate</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setContentView(R.layout.series);

    tts = new TextToSpeech(this,this);
}
</code></pre>

<h2>LogCat</h2>

<pre><code> 03-22 10:46:45.205: E/ActivityThread(3881): Activity com.example.DragDrop.PlaySeries has leaked ServiceConnection android.speech.tts.TextToSpeech$Connection@2bbe5960 that was originally bound here03-22 10:46:45.205: E/ActivityThread(3881): android.app.ServiceConnectionLeaked: Activity com.example.DragDrop.PlaySeries has leaked ServiceConnection android.speech.tts.TextToSpeech$Connection@2bbe5960 that was originally bound here03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): android.app.ServiceConnectionLeaked: Activity com.example.DragDrop.PlaySeries has leaked ServiceConnection android.speech.tts.TextToSpeech$Connection@2bbe5960 that was originally bound here03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 03-22 10:46:45.205: E/ActivityThread(3881): 
 03-22 10:46:45.205: E/ActivityThread(3881): 
</code></pre>
