Play a series of audios on android

0

Good evening, has anyone done or knows how to play a series of audios? I'm trying to make an app look like that Genius game. And I would like to be able to play a sequence of audios that I will pre-determine. I would like to be able to do this within a loop, except that it only executes the last audio. Does anyone have any tips or can you tell me how to do this?

    
asked by anonymous 15.10.2018 / 02:30

1 answer

0

First you must put your audio files in the raw folder of your project, done using the% object MediaPlayer just initialize the object in order to use it. Example:

Creation

MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.song);

Using

mediaPlayer.start();
mediaPlayer.pause();

More options

    
15.10.2018 / 17:05