You could make a call to seekTo
after preparing.
Take a look at this example :
this._mediaPlayer = new MediaPlayer();
this._mediaPlayer.reset();
this._mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
this._mediaPlayer.setDataSource( _data_source_ );
this._mediaPlayer.setOnSeekCompleteListener(this);
this._mediaPlayer.prepare();
this._mediaPlayer.start();
/* Seeking to 1 minute */
this._mediaPlayer.seekTo(60 * 1000);
/* Issue a start in the OnSeekCompleteListener */
Adapt this example to get the duration of a stream once it is prepared and seek to the duration - 5 seconds (if the media is at least 5 seconds long, in your case).
However, it seems that Android has a bug related to the use of seekTo
when seeking to an unbuffered par of the media. Take a look at this and this for more informations. This bug should have been resolved in Android 2.2.