The code I sent just plays a very short ring-tone. You should create an SD card first http://code.google.com/android/reference/othertools.html#mksdcard so you can place longer songs there. (either copy mp3 songs there, or use the built-in sound recorder http://www.openintents.org/en/node/114 ).
If you want the MediaPlayer to stay open after the end of the song, then you should ask again and hope that someone from Google can answer - because I don't know the answer to that one and the MediaPlaybackActivity is closed source and undocumented so far... Peli On Oct 12, 5:06 pm, Baonq86 <[EMAIL PROTECTED]> wrote: > Thank you, Peli. I tried your code. I use a button, when I click the > button, my application will run your code. But immediately, I escape > the default mediaplayer and go back my application ! Can you solve > this problem ? > > On Oct 12, 3:28 am, Peli <[EMAIL PROTECTED]> wrote: > > > Hi, > > > Try this: > > > Intent i = new Intent(Intent.ACTION_VIEW); > > Uri u = > > Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI, > > "1"); > > i.setData(u); > > startActivity(i); > > > This will open the first audio file from the internal content provider > > in Android's media player. > > > Peliwww.openintents.org > > > On Oct 1, 2:20 pm, Baonq86 <[EMAIL PROTECTED]> wrote: > > > > I can built my own mediaplayer but I want call the default mediaplayer > > > program in Android OS. Can anyone help me ? > > > > On Oct 1, 4:58 pm, MrSnowflake <[EMAIL PROTECTED]> wrote: > > > > > I recon your could fire an Intent with VIEW and set the mime type to > > > > your video file. > > > > > On 1 okt, 11:03,Baonq86<[EMAIL PROTECTED]> wrote: > > > > > > Does anyone know to built an application to call the default > > > > > mediaplayer program in Android OS ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

