[android-developers] Re: Issue with MediaPLayer

2010-04-28 Thread Mihai Fonoage
What error do you get? On Apr 26, 7:26 pm, arberb beqi...@gmail.com wrote: This is my script: public class MainActivity extends Activity {     @Override     public void onCreate(Bundle icicle) {         super.onCreate(icicle);         this.setContentView(R.layout.main);         Button

[android-developers] Re: Issue with MediaPLayer

2010-04-28 Thread AJ
Before starting the media you need to do following things:- FileDescriptor fd = getResources().openRawResourceFd(R.raw.xxx).getFileDescriptor(); mp.setDataSource(fd); mp.setAudioStreamType(AudioManager.STREAM_RING); mp.prepareAsync(); For more info check this

Re: [android-developers] Re: Issue with MediaPLayer

2010-04-28 Thread Mihai Fonoage
It should have worked the way he did it ( http://developer.android.com/guide/topics/media/index.html#playraw). The exception raised should be of more help. On Wed, Apr 28, 2010 at 8:23 AM, AJ ajeet.invinci...@gmail.com wrote: Before starting the media you need to do following things:-

[android-developers] Re: Issue with MediaPLayer

2010-04-28 Thread Bob Kerns
Setting the audio stream to be STREAM_RING makes no sense. Why would you want to use the volume control for the ringer for your media, rather than the one for the media??? That's just going to confuse your users big-time. Instead, you may want to do