Confirm MediaPlayer automatic retry on streaming HTTP error

by Skyler » Fri, 20 May 2011 09:34:08 GMT


Sponsored Links
 Hi all,
I have an app which streams mp3s from the web, proxied through a local HTTP 
server. At times, this local proxy server returns an HTTP error. It seems 
that upon receiving this error during the prepare state, the MediaPlayer 
makes one more attempt to stream, sending another request to the URL 
specified in setDataSource().

thread, I can see that after sending an HTTP error response, another request 
for the same URL is made. Can someone confirm this behavior? I'm seeing this 
from the emulator running a 1.6 AVD.

Additionally, can I disable this automatic retry? Is there a specific HTTP 
error code that I can send that will prevent this retry?

Thanks!

-- 



Other Threads

1. Determine which row of ListView is "highlighted"

Hey,

I would like to change the font colour of text in each ListView row
when the row is highlighted. I.e. when the row is not highlighted
leave the font black, however when it is highlighted change the font
colour to white.

Is there a method which allows one to get the ID of the currently
selected row?

Thanks
--~--~---------~--~----~------------~-------~--~----~

2. Hiding contacts

Hi group.

...this is my third attempt... ...sigh... :-) Anyone at Google,
please...?

How can I hide contacts? By hiding I mean that the contact is not
shown in the system "Contacts" group. As I have already explained the
problem is as follows:

1) Programatically create a group

Uri uri = Contacts.Groups.CONTENT_URI;
ContentValues values = new ContentValues();
values.put(Contacts.GroupsColumns.NAME, name);
values.put(Contacts.GroupsColumns.SHOULD_SYNC, 1);
uri = cr.insert(uri, values);

2) Programaically create a contact

ContentValues personInfo = new ContentValues();
personInfo.put(Contacts.PeopleColumns.NAME, name);
ContentResolver cr = context.getContentResolver();
Uri newEntry = cr.insert(People.CONTENT_URI, personInfo);

3) add that contact to the newly created group

Cursor c = cr.query(newEntry, new String[] { BaseColumns._ID }, null,
                null, null);
if ((c != null) && (c.moveToFirst())) {
        long personId = c.getLong(0);
        Contacts.People.addToGroup(cr, personId, groupId);
}

In the emulator the new contacts is not added to the system Contacts
group.

On a real device which of course is assigned to a Google
account, however, the new contact becomes member of the system
Contacts group, too, which is not what I want, because the new
contact
should not be displayed in the Contacts application, unless, of
course, the users switches to my newly creatd group.

Please help.

Regards
Thomas
--~--~---------~--~----~------------~-------~--~----~

3. About screen unlock---help!!!

4. Always-showing view among activities

5. How to replace Android JPEG with my own JPEG Codec

6. DRM Issue

7. About screen unlock鈥攈elp! !!