How to avoid PlayerDriver "invalid percentage value" error?

by Androide » Tue, 15 Jun 2010 15:43:30 GMT


Sponsored Links
 I want to play a live streaming in mp3, but when i call prepareAsync,
"invalid percentage value xxx" shows. This is a example of live
streaming:

 http://83.231.187.202 :80/rtve/radio1.mp3

And this is my simplified code:

mp = new MediaPlayer();
        try {
                        
mp.setDataSource(" http://83.231.187.202 :80/rtve/radio1.mp3");
                } catch (Exception e) {
                }
        mp.setOnPreparedListener( new OnPreparedListener() {
                        @Override
                        public void onPrepared(MediaPlayer mp) {
                                mp.start();
                        }
                });

        Button button = (Button) findViewById(R.id.Button01);
        button.setOnClickListener( new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                                mp.prepareAsync();
                        }


I understand why this is happening, but other apps use this method and
don't show any error in logcat. How can i get this?


Regards.

--