It is technically hacked. And it works only with the music application that comes bundled with Android.
Copy IMediaPlaybackService.aidl to your project ... Contact this Publish to access the MediaPlayer service. Then you can access all of these features.
package com.android.music;
import android.graphics.Bitmap;
interface IMediaPlaybackService
{
void openFile(String path, boolean oneShot);
void openFileAsync(String path);
void open(in long [] list, int position);
int getQueuePosition();
boolean isPlaying();
void stop();
void pause();
void play();
void prev();
void next();
long duration();
long position();
long seek(long pos);
String getTrackName();
String getAlbumName();
long getAlbumId();
String getArtistName();
long getArtistId();
void enqueue(in long [] list, int action);
long [] getQueue();
void moveQueueItem(int from, int to);
void setQueuePosition(int index);
String getPath();
long getAudioId();
void setShuffleMode(int shufflemode);
int getShuffleMode();
int removeTracks(int first, int last);
int removeTrack(long id);
void setRepeatMode(int repeatmode);
int getRepeatMode();
int getMediaMountedCount();
}
, .