when I develop an android native sdk game or an App that use voice read - 
both using voice in other world... 

what to do when incoming call coming, voice auto pause and continue - in 
case reading text with voice - from point left?  *sample code from text 
voice auto Read App:*

    public void say(String text2say){
>
>     if (!ru) {
>
>     talker.speak(text2say, TextToSpeech.QUEUE_FLUSH, null);
>
>     } else {
>
>     Toast.makeText(getApplicationContext(), 
>> getResources().getString(R.string.TTSruNo), Toast.LENGTH_LONG).show();
>
>     trackingToggleButton.setChecked(false); 
>
>     }
>
>     }
>
>  
>
>     public void onInit(int status) {
>
>         say(getResources().getString(R.string.HelloWorld));
>
>  
>
>     }
>
>  
>
>     @Override
>
>     public void onDestroy() {
>
>         if (talker != null) {
>
>             talker.stop();
>
>             talker.shutdown();
>
>         }
>
>  
>
>         super.onDestroy();
>
>     }
>
>
>>
>>     private String loadText3(){
>
>     InputStream inputStream;
>
>     
>
>     if (ru) {
>
>         inputStream = getResources().openRawResource(R.raw.help);//_ru 
>>  --- raw-ru/
>
>     } else {
>
>         inputStream = getResources().openRawResource(R.raw.help);
>
>     }
>
>     
>
>         ByteArrayOutputStream byteArrayOutputStream = new 
>> ByteArrayOutputStream();
>
>         
>
>         int i;
>
>      try {
>
>       i = inputStream.read();
>
>       while (i != -1)
>
>          {
>
>           byteArrayOutputStream.write(i);
>
>           i = inputStream.read();
>
>          }
>
>          inputStream.close();
>
>      } catch (IOException e) {
>
>       // TODO Auto-generated catch block   
>>  http://android-er.blogspot.com/2010/07/display-text-file-in-resraw_01.html
>
>       e.printStackTrace();
>
>      }
>
>      
>
>         return byteArrayOutputStream.toString();
>
>    }
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to