I\'m creating a music player for Android and it\'s mostly working. The problem is that when I turn the device horizontally I lose all the variables from the Activity (which
Another way would be to :
In your AndroidManifest.xml, find your entry for your activity and add the following attribute and value:
android:configChanges="orientation|screenSize"
This will stop your activity from being destroyed and recreated on orientation.