Time taken in connecting while audio streaming in android? -


i using simple audio streaming in android app this:

    try   {     mediaplayer media = new mediaplayer();     media.setaudiostreamtype(audiomanager.use_default_stream_type);     media.setdatasource("http://indiespectrum.com:9000");     media.prepare();     media.start();  } catch(exception e) {     //getting exception } 

where using 4 different url .when start radio streaming takes while start playing.sometimes takes 5-6 sec , around 40-45 sec start playing radio. want know if can speed these time taken .as of these uses shoutcast there anyway speed connection or depends on kind of bitrate or something.please help?

one way speed things lot leveraging uimain thread , doing audiostreaming using asynctask, wich enables proper , easy use of ui thread. class allows perform background operations , publish results on ui thread without having manipulate threads and/or handlers.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -