Hiren Sangani
- Forum posts: 1
Jul 7, 2013, 5:04:46 PM via Website
Jul 7, 2013 5:04:46 PM via Website
Hi all,
I am brand new to the android world. I made a simple calculator app and a splash screen which make sound while start the splash screen and pressing the buttons of calculator. I ran this app on Emulator and everything went well but when I download .apk to my HTC Desire S then the calculator works and they make sound but I added SpeechToText object which does speak string when I pressed some of the buttons . For example I put button sound on + then this button function well but it doesn't speak..
String textA="addition";
t2s= new TextToSpeech(MainActivity.this,new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
// TODO Auto-generated method stub
if(status!=TextToSpeech.ERROR){
t2s.setLanguage(Locale.US);
}
add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
ButtonAdd.start();
t2s.speak(textA, TextToSpeech.LANG_AVAILABLE, null);
counter++;
display.setText("Total is" + counter);
}
Please help me out..
Thanks,
Hiren
I am brand new to the android world. I made a simple calculator app and a splash screen which make sound while start the splash screen and pressing the buttons of calculator. I ran this app on Emulator and everything went well but when I download .apk to my HTC Desire S then the calculator works and they make sound but I added SpeechToText object which does speak string when I pressed some of the buttons . For example I put button sound on + then this button function well but it doesn't speak..
String textA="addition";
t2s= new TextToSpeech(MainActivity.this,new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
// TODO Auto-generated method stub
if(status!=TextToSpeech.ERROR){
t2s.setLanguage(Locale.US);
}
add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
ButtonAdd.start();
t2s.speak(textA, TextToSpeech.LANG_AVAILABLE, null);
counter++;
display.setText("Total is" + counter);
}
Please help me out..
Thanks,
Hiren
— modified on Jul 7, 2013, 5:05:19 PM
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.