How can I play a mp3 song using Google Play Music.
I am trying to play, pause, next etc in Google Play Music.
I have set the music player as default.
I am able to broadcast the Next and previous by using the below commands.
public static final String CMD_NAME = "CMD_NAME";
public static final String CMD_PAUSE = "CMD_PAUSE";
public static final String CMDTOGGLEPAUSE = "togglepause";
public static final String CMDPAUSE = "pause";
public static final String CMDPLAY = "play";
public static final String CMDPREVIOUS = "previous";
public static final String CMDNEXT = "next";
public static final String SERVICECMD = "com.android.music.musicservicecommand";
AudioManager mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
if(mAudioManager.isMusicActive()) {
Intent i = new Intent(SERVICECMD);
i.putExtra(CMDNAME , CMDNEXT);
this.sendBroadcast(i);
}
How can I broadcast for play a song for a particular mp3 file (input as mp3 file name) .