Audio Insertion

1. Add audio into res -> raw folder
2. In Activity class, add the below code to your class where you wish to play sound -
        MediaPlayer ring = MediaPlayer.create(MainActivity.this, R.raw.applause);
        ring.start();

Comments

Popular posts from this blog

@Overrride annotation introduced in Java1.5

Open-Closed Principle

S.O.L.I.D. Class Design Principles