The songs I have are all MediaPlayers, and when I change from horizontal to vertical orientation, or vice versa, the song stops, and then begins playing from the start of the song. I suspect that when i change the layout to horizontal or to vertical that the onPause() method is called or something. What can I do to prevent the song from restarting, and to just keep playing normally when I change from vertical to horizontal and vice versa? Would this have anything to do with the fact that I implemented these methods?
@Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
music.get(SongPlaying).stop();
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
music.get(SongPlaying)).stop();
}
@Override
protected void onStop() {
// TODO Auto-generated method stub
super.onStop();
music.get(SongPlaying)).stop();
}