Beiträge von Felix752698

    thx :D


    package de.androidnewcomer.saghallo;


    import android.app.Activity;
    import android.os.Bundle;
    import android.speech.tts.TextToSpeech;
    import android.speech.tts.TextToSpeech.OnInitListener;
    import java.util.Locale;


    public class StartActivity extends Activity implements OnInitListener {


    private TextToSpeech tts;


    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    tts = new TextToSpeech(this, this);


    }


    @Override
    public void onInit(int arg0) {
    tts.setLanguage(Locale.GERMAN);
    tts.speak("Hallo!", TextToSpeech.QUEUE_FLUSH, null);
    }



    }

    Jetz siehts so aus ^^


    package de.androidnewcomer.saghallo;


    import android.app.Activity;
    import android.os.Bundle;
    import android.speech.tts.TextToSpeech;
    import android.speech.tts.TextToSpeech.OnInitListener;
    import java.util.Locale;


    public class StartActivity extends Activity implements OnInitListener {


    private TextToSpeech tts;


    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    tts = new TextToSpeech(this, this);


    }


    @Override
    public void onInit(int arg0) {
    tts.setlanguage (Locale.GERMAN);
    tts.speak("Hallo!", TextToSpeech.QUEUE_FLUSH, null);
    }



    }

    Also, ich versuch grad meine erste app zu programmiern, welche hallo sagen soll, aber ich finde den fehler hier im quellcode nich, die rot markierten teile unten werden mir in eclipse als syntaxfehler unterstrichen, könnt ihr mir helfen? Bin ich zu doof?
    THX im voraus, MFG Felix



    package de.androidnewcomer.saghallo;


    import android.app.Activity;
    import android.os.Bundle;
    import android.speech.tts.TextToSpeech;
    import android.speech.tts.TextToSpeech.OnInitListener;
    import java.util.Locale;


    public class StartActivity extends Activity implements OnInitListener {


    private TextToSpeech tts;


    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    tts = new TextToSpeech(this, this)


    }


    @Override
    public void onInit(int arg0) {
    tts.setlanguage (locale.GERMAN)
    tts.speak("Hallo!", TextToSpeech.QUEUE_FLUSH, null);
    }



    }