>
>     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); 
>
>     }
>     }
>     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();
>        }
>     
> // listener for trackingToggleButton's events
> OnCheckedChangeListener trackingToggleButtonListener = new 
> OnCheckedChangeListener()
>   {
>      // called when user toggles tracking state
>      public void onCheckedChanged(CompoundButton buttonView,
>         boolean isChecked)
>      { 
>         // if app is currently tracking
>         if (!isChecked)
>         {
>             if (talker != null) {
>                 talker.stop();
>                 
> //talker.shutdown();//http://www.aviyehuda.com/2010/10/21/android-text-to-speech-simple-example/
>             }
>         } // end if
>         else  
>         {   
>         say(loadText3());
>         } // end else
>      } // end method onCheckChanged
>   }; // end anonymous inner class 

On Saturday, April 19, 2014 7:50:06 PM UTC+3, lselwd wrote:
>
> I did a Java/Android app (game). problem
> reading (with voice by pressing a button) of help-section-page text 
> conflicts with incoming ring & talk... well?
>

-- 
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