Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8868167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:12:20+00:00 2026-06-14T17:12:20+00:00

I am developing a simple radio streaming application to play radio using a URL.

  • 0

I am developing a simple radio streaming application to play radio using a URL. This application is working in all the versions except for V>=4.0

Do anyone have any Idea over this.

   initializeUIElements();
    StartPlaying();

     private void initializeUIElements() {

    buttonPlay = (ImageView) findViewById(R.id.buttonPlay);
    buttonPlay.setOnClickListener(this);
    playSeekBar=(ProgressBar)findViewById(R.id.progressBar1);
}


 private void startPlaying() {


    initializeMediaPlayer();
    player.setOnPreparedListener(new OnPreparedListener() {

        public void onPrepared(MediaPlayer mp) {

            Log.i("on prepared", "on prepared");
            mp.start();
        }
    });
    player.setOnErrorListener(new OnErrorListener(){
        public boolean onError(MediaPlayer arg0, int arg1,
            int arg2) {
            Toast.makeText(getApplicationContext(),"An error happened while preparing radio",Toast.LENGTH_LONG).show();
           player.reset();
            initializeMediaPlayer();
        return false;
        } 

});

private void initializeMediaPlayer() {
    player = new MediaPlayer();
   player.reset();
    try {
        player.setAudioStreamType(AudioManager.STREAM_MUSIC);
        player.setDataSource("http://***************");
        player.prepareAsync();

    } catch (IllegalArgumentException e) {
        e.printStackTrace();
    } catch (IllegalStateException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    catch(Exception e)
    {
        e.printStackTrace();
    }

    player.setOnBufferingUpdateListener(new OnBufferingUpdateListener() {

        public void onBufferingUpdate(MediaPlayer mp, int percent) {

            Log.i("percent", ""+percent);
           if( (percent!=0)||(percent==100) )
           {

               playSeekBar.setVisibility(View.INVISIBLE);
               buttonPlay.setVisibility(View.VISIBLE);
           }


        }
    });

In Android version 4.0, It is giving an error as:

  11-23 13:06:37.329: E/MediaPlayer(4011): Error (1,-2147483648)

and Player.bufferingUpdateListener() is not called. Here It is showing just that playseekbar revolving and revolving.. Please help on this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:12:21+00:00Added an answer on June 14, 2026 at 5:12 pm

    It can be a problem with your particular device. Try running the same on 4.0 emulator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im developing a simple application that have a line like this: string[] values =
im developing a simple Mxml application using flex 3. I have used simple text
I'm developing simple android application, using Media Player to play sound. It has a
Developing a simple application. With a webview inside a window, loading a url. This
I'm developing a simple Android application that would have an action bar on the
I am developing a simple pyramid application where I am using JQuery to do
Im developing a simple console application using java. I want to display currently running
Im developing a simple console Application using java. The code is given below `
Hi I am developing a simple application based upon ASP.NET MVC. I have altered
i am developing simple game application just using pan gesture and cgaffinetransform rotate application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.