Hello every one !
I'm new on Android Dev (and French, sorry for my mistakes) and I try
to develop an app which enables to listen a shoutcast stream.

It prefectly works on Android 2.2 but not in Android 2.1... Coul'd you
help me ?

I've got this code (just the function play()) :

private void play() {
Uri myUri = Uri.parse("http://ecoutez.fajet.net:8014/";);
try {
 if (mp == null) {
  this.mp = new MediaPlayer();
 } else {
         mp.start();
 }
 mp.setDataSource(this, myUri); // Go to Initialized state
 mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
 mp.setOnPreparedListener(this);
 mp.setOnBufferingUpdateListener(this);

 mp.setOnErrorListener(this);
 mp.prepareAsync();

 System.out.println("Truc : " + mp.getDuration());

 Log.d(TAG, "LoadClip Done");
} catch (Throwable t) {
 Log.d(TAG, t.toString());
}
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to