Hi,
I would like to play sound file from resources.
Code generates NullException on running from activity.
Code goes like this:
private void playBell(){
MediaPlayer mp = MediaPlayer.create(Calibrate.this, R.raw.beep);
mp.start();
mp.setOnCompletionListener(new OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
mp.release();
}
});
}
Does playBell has to be called from background task? or it can be
called from foreground and it will do whatever it needs to be in the
background.
Am I missing something?
Tnx for help.
--
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