NEO
NEO

Reputation: 1

some url does't work to play online radio in android

I'm building an Android app that will stream several radio stations from my country, i used

some url, and they don't work for me. here the code :

 private void startStreamingAudio() {
        try { 
            final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progress_bar);
            if ( audioStreamer != null) {
                audioStreamer.interrupt();
            }
            audioStreamer = new StreamingMediaPlayer(this,textStreamed, playButton, streamButton,progressBar);

            audioStreamer.startStreaming("http://stream.mosaiquefm.net/mosaique64k?MSWMExt=.asf",5208, 216);
            streamButton.setEnabled(false);
        } catch (IOException e) {
            Log.e(getClass().getName(), "Error starting to stream audio.", e);                  
        }

so whene i change an other url for exemple this URL :

http://npr.ic.llnwd.net/stream/npr_live24 it works fine.

i just want to know, why the code works with some URL, and not with some other ! thank you helping me..

Upvotes: 0

Views: 416

Answers (1)

kabuko
kabuko

Reputation: 36302

I don't know what your StreamingMediaPlayer class is, but the supported list of natively supported media formats for Android does not include ASF.

Upvotes: 1

Related Questions