can I use the setDataSource like this??
mp.setDataSource("E:/xxx/music/aaa.mp3");
btw
can you plz give me a complete code.. coz I am only a beginner on this
side..
thx
On Aug 25, 1:45 am, blindfold <[EMAIL PROTECTED]> wrote:
> Apply mp.setDataSource("/data/data/myapplication/files/piano.mp3");
>
> On Aug 17, 9:07 pm, april <[EMAIL PROTECTED]> wrote:
>
>
>
> > Thank you for the help. I tried the second method. It works.
>
> > However, I change the audio source to local file, I got IOException. I
> > have checked that the file is located correctly in the phone /data/
> > data/myapplication/files/piano.mp3.
>
> > What is the problem? Can android play mp3 from local files?
>
> > private void playAudio()
> > {
> > try
> > {
> > mp=new MediaPlayer();
> > mp.setDataSource("piano.mp3");
> > mp.reset();
> > mp.prepare();
> > mp.start();
> > }
> > catch(Exception e)
> > {
> > String a= e.toString();
> > String b =a+"sasa";
> > }
> > }- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---