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.

--



Other Threads

1. How to get coordinates by clicking a point in the map

Hi Developers,
in my app that I want to develope I need to get location coordinates
by clicking a point in google maps.
Ist this possible? If yes, what code do I need for this.

Thank you in advance!

-- 

2. Android Custom Animation

Hi, I want to make custom animation that would make the sides of a Button go
to the center and back. When the user touches the button, the center of the
left boundary and center of the right boundary of the button to go the
center of the View (Button) and back (as animation). Like this:
http://i.imgur.com/cPXC3.png?4691 Now I don't know if I should do this with
custom animation implementing applyTransformation() or with redrawing of the
Button with onDraw(Canvas) overriding. What is the correct way to achive
this?

-- 

3. Twitter on Android

4. Assign LayoutParams from Xml

5. android-ndk,handler usbfs read write

6. [WTA] Setting MMS di Motorola Atrix 4G

7. Bluetooth UUID receive delayed