android devoloper code to start default music player

Hi all

place below code in your onclick method, and it works on all devices and version of OS

if(android.os.Build.VERSION.SDK_INT>=15){        
    Intent intent=Intent.makeMainSelectorActivity(Intent.ACTION_MAIN,
    Intent.CATEGORY_APP_MUSIC);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//Min SDK 15
    startActivity(intent);
}else{
    Intent intent = new Intent("android.intent.action.MUSIC_PLAYER");//Min SDK 8
    startActivity(intent);
}