Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Open Music Player

Tags:

android

Is there any way to programatically open the Android Music Player?

I'm sure there is some kind of Intent somewhere but I cannot find it.

James

like image 448
James Avatar asked Dec 07 '22 01:12

James


2 Answers

android.intent.action.MUSIC_PLAYER is your friend. See MediaStore on Android Docs for further information.

like image 184
hanspeide Avatar answered Dec 09 '22 13:12

hanspeide


Create a new intent:

Intent intent = new Intent("android.intent.action.MUSIC_PLAYER");
startActivity(intent);
like image 38
seema Avatar answered Dec 09 '22 15:12

seema