I develop one book reader application which play audio according to page, but problem is there when i start the application my first page audio is running during that audio playing i change the orientation at that time that audio restarting and previous audio is also running and that screen has both orientation layout. one is layout and another is layout-land layout.xml files when i apply configChanges in manifest file my layout-land cannot apply.
I develop one book reader application which play audio according to page, but problem
Share
This is because you have to implement the
onOrientationChangemethod in your activity. same has to be applied to manifest file of the activity asIn
onOrientationChangemethod. get the current playing position and give that to media player object and play again.By doing this, it will not create new object of media player and uses the same with current position.