Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void tocarSino(final int repeticao, final long intervalo,final int audio, final Context ctx){
- Thread timerSound = new Thread(){
- public void run(){
- try {
- for (int i=1; i<=repeticao; i++) {
- MediaPlayer mediaPlayer = MediaPlayer.create(ctx, audio);
- mediaPlayer.start();
- sleep(intervalo);
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- };
- timerSound.start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement