android 调用本地音乐播放器

Intent intent_music = new Intent(Intent.ACTION_PICK);  

			intent_music.setDataAndType(Uri.EMPTY,"vnd.android.cursor.dir/playlist");  

			intent_music.putExtra("withtabs", true); // 显示tab选项卡  

			intent_music.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 

			

			Intent j =Intent.createChooser(intent_music, "Choose an application to open with:");

			if (j == intent_music) {

				startActivity(j); 

			} else {

				Intent intent = new Intent("android.intent.action.MUSIC_PLAYER"); 	 

				startActivity(intent);

			}

你可能感兴趣的:(android)