I read on the net that mediaplayer.pause () or stop () does not work for projects with sdk minimum less than 24. In this case, how could i proceed? my minimum sdk is 16 and I would like to keep it at 16 while implementing pause and stop in my app , if no i did so mediaplayer.pause() .i got this error
QCMediaPlayer mediaplayer NOT present
what matters most to me is how to implement pause and play. my pause method ;
pause.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mediaPlayer.isPlaying()) {
mediaPlayer.pause();
}
}
});