Play radio station on Android app

How to play radio station

to help Media Player

in Android

?

I am using iRadeo station

which has two songs with

   url:"https://www.iradeo.com/station/133063" 

      

but when i try to do

   Uri myUri = Uri.parse("https://www.iradeo.com/station/133063"); 

      

Media Player

gives an error message java.io.FileNotFoundException: No content provider

But when I try to play a specific song from that station using .../.../station/133063/download-track/469508

as my new uri it Media Player

works and the app starts playing the song.

Does anyone know why I can't play the entire playlist using the station url iRadeo radio

? Thank!

+3


source to share


1 answer


Your link points to an HTML page and MediaPlayer

cannot play it because it is not a music file. Although you can play songs when you open this page in a browser, MediaPlayer

doesn't know this. Therefore, you have to point to the actual song files on the server and then play them one by one.

? , , . , , , , , . , . iRadeo API , , .
: , HTML-. : , , . . - .



Once you have the location of the files, it's time to play them. You can find how to do this here: fooobar.com/questions/2249006 / ... . Just use URI for raw files.

PS. I'm not very good at materials. If you don't understand anything, feel free to ask.

+1


source







All Articles