i am trying to start a tts engine from a service which is started by a BroadcastReceiver . The service starts but am not getting any sound. I can see the log message as specified by Log.d in my prog and also get the Toast messsage but no sound:
Recevier class : public void onReceive(Context context,Intent intent) { context.startService(new Intent(context,"Service.class")); ... } Service class: public static TextToSpeech mtts; public void onStart(Intent intent,int startid) { mtts = new TextToSpeech(getApplicationContext(),this); mtts.setLanguage(Locale.ENGLISH); Toast.makeText(getApplicationContext(), "From Service",Toast.LENGTH_SHORT ).show(); mtts.speak("Testing",TextToSpeech.QUEUE_FLUSH, null); Log.d("Serivce","Synthesis done") ...} the log message i get is: STOP command without a player 06-26 19:11:00.281: DEBUG/MediaPlayer(52): Couldn't open file on client side, trying server side ERROR/MediaPlayerService(30): Couldn't open fd for content://settings/system/notification_sound ERROR/MediaPlayer(52): Unable to to create media player WARN/NotificationService(52): error loading sound for content://settings/system/notification_sound WARN/NotificationService(52): java.io.IOException: setDataSource failed.: status=0x80000000 ... WARN/NotificationService(52): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:699) ... WARN/NotificationService(52): at android.media.AsyncPlayer.startSound(AsyncPlayer.java:62) -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en