33 原始资源(音乐视频等)
1.放在res/raw目录下的bomb.mp3文件
mediaplayer = MediePlayer.create(MainActivity.this,R.raw.bomb);
mediaplayer.prepare();
mediaplayer.start();
2.放在assets目录下的bomb.mp3文件
mediaplayer = new MediaPlayer();
mediaplayer .setDataSource(getAssets().openFd("bomb.mp3").getFileDescriptor());
mediaplayer.prepare();
mediaplayer.start();