It should play mp3 just fine...

Maybe after adding an mp3 file, you first have to invoke the
MediaScanner through "Dev Tools" or "Ze Dev Tools" / "MediaScanner",
so that the mp3 file gets into the content provider.

Peli

On Oct 15, 10:17 am, Baonq86 <[EMAIL PROTECTED]> wrote:
> Thank you, Peli. Yourcode works well ! But when I play the
> External_Content_URI, the default mediaplayer will play the first song
> in the sdcard. It's a mp3 song, and the mediaplayer notice that
> "cannot read this format". I use default Music Application, it plays
> well !! Do you have the same problems ?? What is the best format you
> think default MediaPlayer plays well ?? Thank you !!
>
> On Oct 13, 1:59 am, Peli <[EMAIL PROTECTED]> wrote:
>
> > The code I sent just plays a very short ring-tone.
>
> > You should create an SD card 
> > firsthttp://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 recorderhttp://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
-~----------~----~----~----~------~----~------~--~---

Reply via email to