728x90

public void startMusic(){

Intent intent = this.getPackageManager().getLaunchIntentFormPackage("com.sec.android.app.music");

this.startActivity(intent); // 뮤직플레이어 어플 실행

 

Intent intent2 = new Intent("com.android.music.musicservicecommand");

intent2.putExtra("command", "play");

sendBroadcast(intent2); // 노래 재생

}

728x90

+ Recent posts