Playing Audio File from Raw Resources
Senin, 04 April 2011
0
komentar
Step 1: Put the audio/video file in (res/raw) folder of your project. If the "raw" folder does not exist, create one.
Step 2: Put in the following code:-
Private MediaPlayer mp;
mp = MediaPlayer.create(this, R.raw.audiofilename);
mp.setLooping(true);
mp.start();
mp.setLooping(true);
mp.start();
Note:-
1. Change the audiofilename according to your own audio file name.
2. When you mp.setLooping(true), the audio file will play continuosly until you stop it.
Roger,
mytikus
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: Playing Audio File from Raw Resources
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke https://androidemoticonss.blogspot.com/2011/04/playing-audio-file-from-raw-resources.html. Terima kasih sudah singgah membaca artikel ini.Ditulis oleh Unknown
Rating Blog 5 dari 5
0 komentar:
Posting Komentar