Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
$149

Single App License

1 application Binary restricted distribution 6 months support
$599

Developer License

Unlimited projects Source and binary distribution 6 months support
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

  • Released: Jun 27, 2012
    Last Update: Dec 2, 2012
  • Language: Java
    Platform(s): Android
  • Category: System & Frameworks
  • Time / costs savings: 148h / $8880 *
(3 ratings)

RadioStreams SDK for Android

RadioStreams SDK for Android
Developed by Mos IT Ltd., Released Jun 27, 2012

The RadioStreams SDK is a radio streaming component for Android developers which simplifies the application development process while creating a radio/audio streaming app. Supports mp3, aac, aac+ and wma audio streams over http and mms protocols.

Java

Tags: android , radio , stream , streaming

alt text

Radio Streaming Framework for Android Software Developers.

The RadioStreams SDK is a radio streaming component for Android developers which simplifies the application development process while creating a radio/audio streaming app. Can be integrated easily.

Features

  • Http and Mms protocols supported.
  • Mp3, AAC, AAC+ and Wma audio streams supported.
  • Parsing shoutcast & Icecast metadata.
  • Works on Edge, 3G and WiFi.
  • Simple integration.
  • Contains full working sample.

Disclaimer: RadioStreams SDK can play all WMA version 9 streams but most version 10 streams not supported.

Disclaimer #2: Use of this software may require the payment of patent royalties.

Back to top

USAGE EXAMPLE

  • Creating MMSRadio or HTTPRadio object

    HTTPRadio radio = new HTTPRadio(new URI("http://mfm.ice.infomaniak.ch/playlists/mfm-64.aac.m3u"));
    radio.play();
    
    MMSRadio radio = new MMSRadio(new URI("mms://wstream5a.di.fm/vocaltrance"));
    radio.play();
    
  • Handling radio state and metadata changes

    radio.setRadioChangeListener(new RadioChangeListener() {
        public void radioStateChanged(final RadioState state) {
            runOnUiThread(new Runnable() {
                    public void run() {
                        switch (state) {
                        case RADIO_STATE_BUFFERING:
                            status.setText("Status: Buffering");
                            break;
                        case RADIO_STATE_CONNECTING:
                            status.setText("Status: Connecting");
                            break;
                        case RADIO_STATE_PLAYING:
                            status.setText("Status: Playing");
                            break;
                        case RADIO_STATE_STOPPED:
                            status.setText("Status: Stopped");
                            break;
                        case RADIO_STATE_ERROR:
                            switch (radio.getRadioError()) {
                            case RADIO_ERROR_PLAYLIST_PARSING:
                                status.setText("Status: Playlist Parsing Error");
                                break;
                            case RADIO_ERROR_DECODING:
                                status.setText("Status: Decoding Error");
                                break;
                            case RADIO_ERROR_NETWORK_ERROR:
                                status.setText("Status: Network Error");
                                break;
                            case RADIO_ERROR_FILE_STREAM_OPEN:
                                status.setText("Status: Stream Open Error");
                                break;
                            default:
                                status.setText("Status: Error");
                            }
                            break;
                        }
                    }
                });
        }
    
        public void radioMetadataChanged(final IcyMetadata metadata) {
                runOnUiThread(new Runnable() {
                    public void run() {
                        nowPlaying.setText("Now Playing: " + metadata.radioTitle);
                    }
                });
         }
    
    });
    
Back to top

INSTALLATION

  1. Copy dist/* to root directory of your Android application.

  2. Move dist/libs to root directory of your Android application.

  3. In Eclipse right click to your project folder and select Refresh

  4. In Package Explorer right click on RadioStreamsSDK.jar and select Build Path - Add to Build Path

Back to top

Compiling FFMPEG

  • Go to the ffmpeg-scripts folder and edit settings.sh and update NDK_BASE variable with your android-ndk path. Than just run

    ./compile

You may also need to update your PATH if ./compile fails.

export PATH=/Users/USERNAME/android-ndk-r8b/prebuilt/darwin-x86/bin:/Users/USERNAME/android-ndk-r8b/:$PATH
  • After running ./compile script succesfully, ffmpeg static libraries will be generated under ffmpeg-scripts/ffmpeg. Copy those libraries into jni folder:

    cp ffmpeg-scripts/ffmpeg/libavcodec/libavcodec.a jni/

    cp ffmpeg-scripts/ffmpeg/libavformat/libavformat.a jni/

    cp ffmpeg-scripts/ffmpeg/libavutil/libavutil.a jni/

Than to build libradiostreams.so get back to root folder and run

ndk-build -B V=1
View all 2 reviews »

User Reviews

  • Gurumustuk Khalsa 6 months ago
    Overall it's great that someone is working on this kind of component but still a lot of work to go to make it fully useable. We were unable to actually use it because it lacked some core important features. I hope the developer stays active and makes the necessary fixes.

    From our developers:

    "Currently we are not using Radio Sdk due to issues with some core functionality necessary for this app. There is no function to pause the stream once started. The pause function acts as stop function. Also there is no support for streaming audio in a background service. I tried integrating it but outcome was not satisfactory. I have added a suggestion comments in binpress.com for the SDK, if developer fixes these issues then we can integrate it."
    Flag
    Was this helpful? Yes No
  • 0 of 1 people found this review helpful Uuganbayar Amarsanaa 7 months ago
    It is very difficult to integrate if you don't know android NDK.
    Flag
    Was this helpful? Yes No
Read all 77 comments »

Questions & Comments


Or enter your name and Email
  • YoungMoon Kim License holderDeveloper License 2 weeks ago
    Hi,
    Recently on device with OS 4.1.2 its getting crash, after few seconds of play button click. Below is log details

    05-10 01:58:54.950: E/AudioTrack(17452): AudioFlinger could not create track, status: -12
    05-10 01:58:54.955: E/AudioTrack-JNI(17452): Error initializing AudioTrack
    05-10 01:58:54.955: E/AudioTrack-Java(17452): [ android.media.AudioTrack ] Error code -20 when initializing AudioTrack.
    05-10 01:58:54.960: W/dalvikvm(17452): threadid=28: thread exiting with uncaught exception (group=0x412ab2a0)
    05-10 01:58:54.970: E/AndroidRuntime(17452): FATAL EXCEPTION: Thread-334531
    05-10 01:58:54.970: E/AndroidRuntime(17452): java.lang.IllegalStateException: play() called on uninitialized AudioTrack.
    05-10 01:58:54.970: E/AndroidRuntime(17452): at android.media.AudioTrack.play(AudioTrack.java:887)
    05-10 01:58:54.970: E/AndroidRuntime(17452): at com.mosteknoloji.radiostreams.core.radio.Radio.run(Radio.java:231)
    05-10 01:58:54.970: E/AndroidRuntime(17452): at java.lang.Thread.run(Thread.java:856)

    As it working with device with OS 2.2, 2.3.3 and it use to work on device with OS 4.1.2 before but now it getting crashed.
    Any idea what could be the cause for this.

    Thanks.
    • Mos IT Ltd. Developer 2 weeks ago
      Thanks for reporting. Is the stream differs for the crash or any stream crashes 4.1.2 immediately.
    • YoungMoon Kim License holderDeveloper License 1 week ago
      Any stream crashes, its bit strange earlier it was working.
    • Mos IT Ltd. Developer 1 week ago
      Is this the demo application or your application. Does the demo app crashes with 4.1.2
      The error messages indicates out of memory error or AudioTrack limit reached errors when I search in detail. AudioTrack is used by soundpool, mediaplayer and there seems to be a limit of 32 on system. Maybe your app uses too many or some other app and this causes these errors.
  • YoungMoon Kim License holderDeveloper License 1 month ago
    Hi,
    I had looking into your demo app, few question on it.
    - How to get album/song imageUrl in stream metadata?
    - How to run streaming radio in background service with notification updates? Is this feature supported in current sdk v1.2, if not then when we can expect this feature integration.

    Thanks.
    • Mos IT Ltd. Developer 1 month ago
      Hello Kim

      - You register a RadioChangeListener as shown in the description. When ever metadata changes RadioStreams calls radioMetadataChanged function with IcyMetadata which contains radioTitle, radioName, radioGenre and radioUrl fields. They all are filled if provided with the stream.
      - Currently background service is not supported. Either it will be included within RadioStreams if possible or a sample app will be provided that does that. Next release in max 1-2 weeks.

      Best,
    • Arthur License holderSingle App License 1 month ago
      Hi Kim,

      try this app and integrate it with this SDK only in three hours :D

      http://goo.gl/yyHsd
    • YoungMoon Kim License holderDeveloper License 1 month ago
      Hi,
      Yes, I had registered RadioChangeListener and in radioMetadataChanged method I receive IcyMetadata on radioMetadataChange. But its missing streamUrl(album/song url) to get album/song image/artwork.

      The current IcyMetadata gives below values for one of the radioparadise mp3 stream
      radioTitle - Buddy Guy - Feels Like Rain (w/ Bonnie Raitt)
      radioName - Radio Paradise
      radioGenre - Rock
      radioUrl - http://www.radioparadise.com

      By using code given in below link post
      http://stackoverflow.com/questions/8970548/how-to-get-metadata-of-a-streaming-online-radio
      I was able to get this metadata info for same stream
      StreamTitle='Buddy Guy - Feels Like Rain (w/ Bonnie Raitt)';StreamUrl='http://www.radioparadise.com/graphics/covers/m/B0000004ZL.jpg';
      which also contains image info as 'StreamUrl', which is currently missing in current IcyMetadata response.

      If you could integrate this by adding one more variable return from IcyMetadata for StreamUrl in your library then it will be very helpful for us. And could you point me the class and location where this IcyMetadata variables are set with metadata.

      Regarding background service, ok that' good. Hoping it will get very soon.

      Thanks.




    • Mos IT Ltd. Developer 1 month ago
      Hi,

      I opened an issue for this. The data is parsed within ffmpeg so not that easy but not hard also to do this.
      http://www.binpress.com/issues/view/id/2613

      What i found is StreamUrl is not parsed, only icy-url that comes in header is parsed.

      You can follow the issue for further progress.
  • Carlos Andres Caro Perez 2 months ago
    Hello,

    Is there anyway to stop playing radio when incoming call?

    Kind Regards,

    Carlos
    • Arthur License holderSingle App License 2 months ago
      hello,

      you must rewrite the sample app to run the audio stream as android service.

      and you can follow the code below to stop playing when incoming call.

      http://tinypaste.net/Fcj7c6gK

      regards,

      Chris Lin
    • Mos IT Ltd. Developer 2 months ago
      Currently radio is not aware of an incoming call, but I noted this for the next release. Thanks.
    • Carlos Andres Caro Perez 2 months ago
      Yes, I´ve figured it out, but now It doesnt stop when opening another audio source, like youtube or Media player, I will try to fix this now, take this considerations for next release =)

      Thanks

      Carlos
You must be logged-in to vote. Log-in to your account or register now.