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: :80/rtve/radio1.mp3

And this is my simplified code:

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

        Button button = (Button) findViewById(;
        button.setOnClickListener( new OnClickListener() {
                        public void onClick(View v) {

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?



Other Threads

1. Android and Blackberry Enterprise Servers

My entire organization is on the Blackberry Enterprise Server and I
was wondering if there was any plan related to penetrating this
portion of the RIM Business Market with the Android platform and
phones.  Or even better yet if somehow there may be compatibility to
incorporate them somehow.  I know there is intense interest around the
Verizon Google partnership but how can users transition from a
Crackberry to an Android in the business environment?  Or is that just
totally out of reach?


2. GUI Modifier thread


Getting start with Android, I'm trying to create a "Game of life"
software. My application has a TableLayout filled with ImageView for
each cell. I'm trying to run/stop the game once a button has been
click (same button for both). Anyway, what I'm trying to do is to
change my GUI from the thread that run the game. I cannot change the
GUI from a new thread. Ok.

Then I'm trying to use the AsyncTask class to avoid this problem.
Using this mechanism, I still get a "android.view.ViewRoot
$CalledFromWrongThreadException: Only the original thread that created
a view hierarchy can touch its views" Exception.

I'm really stuck and lost with this, any help would be more than

Here is the revelant code:
The Exception is raised in the method drawBoard when I try to set the
image of the ImageView.




3. Passing messages from BroadcastReceiver to Activity

4. Is there a Java API Spec for Android

5. ListView setAdapter in onCreate, getChildCount is zero in onStart?

6. Design Issues

7. Can't find documentation on end-user FW upgrade process