Hello,

i have a Alarm which invoke a BroadcastReciever. This
BroadcastReciever enqueues an Task into my Service. The Task get
executed. On a failure i that Task i play a Sound (mostly for me at
the moment so i can check via aLogcat to see the stacktrace).

If the Phone (Nexus One) is sleeping and the Alarm gets on i have the
feeling that the Audio will not played. When i touch my Phone later
(in the morning) i hear all the Audio Failure Feedback. It that
correct behaviour ?

My Audio get Played with this Code:


                player = new MediaPlayer();
                player.setLooping(false);
                player.setOnCompletionListener(this);
                ...
                ...
                        AssetFileDescriptor afd = null;
                        try
                        {
                                afd = 
getContext().getResources().openRawResourceFd(_resourceID);
                                player.setDataSource(afd.getFileDescriptor(),
afd.getStartOffset(), afd.getLength());
                                player.setVolume(VOLUME, VOLUME);
                                player.prepare();
                                player.start();
                        }
                        ...



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

Reply via email to