private void playMp3(String nameOfFile){ MediaPlayer mPlayer = MediaPlayer.create(this, getResources().getIdentifier(nameOfFile, "raw", getPackageName())); mPlayer.start(); }