Search code examples
andengine

AndEngine MusicReleasedException


When calling onPause() i make all the Necessary checks and then pause the music. Shortly after it 'releases' the music during or after the 'onDestroyResources'. When the onResume() is called, the music is not null, but when checking isPlaying(), it causes an exception. MusicReleasedException

What is happening here?


Solution

  • I had removed a line from the AndroidManifest.xml and broke my app. The main menu was singleton and was having trouble reloading. Thanks to RealMayo's quick fix it is functioning again.

    android:configChanges="keyboardHidden|orientation"
    

    "That line of code should be placed within the "activity" tag of your AndEngine activity in the AndroidManifest. Although that line of code may look weird, it actually serves to affect the sleep cycle of your Activity." - RealMayo