Cara menambahkan musik ke proyek andoid
MediaPlayer mediaPlayer;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mediaPlayer = MediaPlayer.create(getApplicationContext(), R.raw.yoursong);
mediaPlayer.start();
}
@Override
protected void onPause() {
super.onPause();
mediaPlayer.stop();
mediaPlayer.release();
}
Depressed Duck