I encountered this bug after using PlayerHater for a while:
http://stackoverflow.com/questions/21790824/mediaplayer-should-have-subtitle-controller-already-set-kitkat
The symptoms are that no music is playing, but if you turn the volume up or down and then play again it works. The fix is inserting mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
after initiating the mediaplayer. This is done in the constructor of StatelyPlayer, so the working code looks like this:
public StatelyPlayer(Context context) {
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
setWakeLock(context);
.......
.......
I encountered this bug after using PlayerHater for a while:
http://stackoverflow.com/questions/21790824/mediaplayer-should-have-subtitle-controller-already-set-kitkat
The symptoms are that no music is playing, but if you turn the volume up or down and then play again it works. The fix is inserting mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
after initiating the mediaplayer. This is done in the constructor of StatelyPlayer, so the working code looks like this:
public StatelyPlayer(Context context) {
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
setWakeLock(context);
.......
.......