Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Mediaplayer api from android supports streaming a .pls file, but the API is not best option &amp; the documentation is not well. The life cycle diagram given in the official documentation gives valuable information but may be confusing at a first glance.</p> <p>A sample code snippet:</p> <pre><code>MediaPlayer mp; mp=MediaPlayer.create(getApplicationContext(),Uri.parse(url)) Example url of .pls file http://50.xx.xxx.xx:xx40/) mp.start(); mp.pause(); mp.release() (or mp.reset() as applicable) </code></pre> <p><a href="http://developer.android.com/reference/android/media/MediaPlayer.html#create(android.content.Context" rel="nofollow">http://developer.android.com/reference/android/media/MediaPlayer.html#create(android.content.Context</a>, android.net.Uri)</p> <p>There are listeners/callback available with MediaPlayer api but it is really problematic to a App developer working on audio streaming.</p> <p>The static constructor used in the code snippet is suggested/better approach to create the media object with URI (like http url with host and port.) But the call back functions can't be used by developer because the prepare is called by the constructor itself.</p> <p>The created object can be played/stopped in a asyn thread (AsyncTask api).</p> <p>The android official documentation does not give any 'get method' to get the status of the mediaplayer.</p> <p>I welcome android app developers to talk on this;</p> <p>and I wish frame work developers provide more accurate documentation - how much it supports or what's importance &amp; vision of Google Inc and Android framework development team on Mediaplayer API for audio streaming with urls.</p> <p>If some need help from me or share their experience let's please talk on MediaPlayer api for audio streaming @ <a href="http://stackoverflow.com">http://stackoverflow.com</a> or android developers blog (android-developers.blogspot.com).</p> <p>Regards Sree Ramakrishna Program Manager &amp; Android developer @ New Mek Solutions,Hyderabad.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload