Voice Notifications

This is a discussion on Voice Notifications within the Beginning Developers forums, part of the Android Development category; Hello, I would like to make a notification both available on the screen and by a voice message. I was reading some tutorial and tried ...

Results 1 to 2 of 2

Thread: Voice Notifications

  1. #1
    Android Lurker buzza's Avatar
    Join Date
    Sep 2012

    Voice Notifications

    Hello, I would like to make a notification both available on the screen and by a voice message.
    I was reading some tutorial and tried to make it work, but really got stacked

    I have 2 classes: one gets location information and sends it to the server; second - voice class to implement voice alerting.

    Voice.java looks like this:
    import java.util.Locale;
    import android.app.Activity;
    import android.speech.tts.TextToSpeech;
    import android.util.Log;
    import android.os.Bundle;
    publicclass Voice extends Activity implements
    TextToSpeech.OnInitListener {
    //Called when the activity is first created
    private TextToSpeech tts;
    public void onCreate(Bundle savedInstanceState) {
    tts = new TextToSpeech(this, this);
    public void onDestroy() {
    // shutdown tts
    if (tts != null) {
    public void onInit(int status) {
    // TODO Auto-generated method stub
    public void speakOut(String text) {
    tts.speak(text, TextToSpeech.QUEUE_FLUSH, null);
    When I am trying to access speakOut from my first class:
    String waitingtext = "Waiting for location";
    But it looks like I am doing something completely wrong. Eclipse says that I have to change speakOut to a static method…

    What I am thinking about is that I want to create a class that will manage my voice notifications (not only this one, but any other alerts/errors that occur: they should be logged, showed on the screen and made as a voice announcement).

  2. Android.net is the premier Android Forum. Registered users do not see these ads. .

  3. #2
    Super Moderator cali's Avatar
    Join Date
    Sep 2011
    329 times
    Want to welcome you to the site.

Remove Ads


Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Notifications
    By Karenn.x in forum Samsung Galaxy S3
    Replies: 2
    Last Post: 09-20-2012, 06:44 PM
  2. Replies: 0
    Last Post: 06-21-2012, 03:58 PM
  3. Uninstalling Voice Data Required for Voice Synthesis..
    By upkarxxx in forum Sony Xperia Neo
    Replies: 0
    Last Post: 05-19-2012, 03:48 AM
    By JABZOO in forum LG Ally Help
    Replies: 1
    Last Post: 10-12-2010, 11:45 AM

Search tags for this page

android tts notifications

android voice notification

android voice notifications
voice notify android app

voice notify android tutorial

Click on a term to search our sites for related topics.
Android Forum