Issue
I have an app that plays mp3 from a link that I provide which work just fine. Thing is I need it to play live radio from another link.
I don't know how this works for radio . What format should the radio link have . I guess something different from mp3. I really don't know much about these.
I found some tutorials for radio but they don't work. My guess the link they use for streaming isn't working.
A simple sample of media player with two buttons play/stop that will play live radio from a url is what will get me started.
I know it's not ussual to ask for code, but this should be simple and I think I'm missing something. Thanks in advance.
Solution
You can't play "any" online radio stream.
Android Mediaplayer is notorious for streaming problems due to unsupported formats (raw AAC for ex.) or trouble with some protocols (Icecast for ex).
With that said, you can still play lots of existing stuff just by loading the URL. Like Dawid Sajdak commented on your question, make sure the stream follows one of those formats.
Answered By - Valentin Galea
Answer Checked By - David Goodson (JavaFixing Volunteer)