How do I run the following tutorial using an online mp3 url? I tried replacing the url but it doesn't seem to be working. I want to use the same code but with the url. Does anyone have any suggestions?
The tutorial linke: http://www.tutorialspoint.com/android/android_mediaplayer.htm The mp3 url is: http://searchgurbani.com/audio/sggs/1.mp3
Through URL
Through res ---> inside --> row Folder
How to play an .mp3 from the /raw folder:
Download the .mp3 file, save it to song.mp3 and paste into the /raw folder. If you don´t have /raw folder, just create it into the /res folder.
this example doesn´t load the .mp3 from internet, play the .mp3 from the resources.
How to
play an .mp3 from the url:
,change the
oncreate()
method of the example to:so you will able to play the audio mp3 from the url specified.
don´t forget to add
into your Manifest.xml