my app is playing some audio files, but if the user hits the play button twice, it will play then it will play again (something like that).

I would like the next action to happen JUST when the first execution of the audio file is over.

How can I do that?

Here is my code:

```
MediaPlayer mMediaPlayer = new MediaPlayer();
try {
    mMediaPlayer.setDataSource((endMidia));
    mMediaPlayer.prepare();
} catch (IllegalArgumentException e) {
    e.printStackTrace();
}                                        
mMediaPlayer.start();

```

Any help is appreciatted!