perhaps you could add more configuration changes that you want to ignore, starting from running a specific API on android, the orientation consists of other flags, and the documentation says "orientation":
Changed the screen orientation - the user turned the device. Note. If your application targets API level 13 or higher (as indicated by the minSdkVersion and targetSdkVersion attributes), then you should also declare the “screenSize” configuration as it also changes when the device switches between portrait and landscape orientation.
so please try using and tell us if this helped:
android:configChanges=orientation|screenSize"
here's the documentation for "screenSize":
The current available screen size has changed. This represents a change in the current size compared to the current aspect of the relationship, so it will change when the user switches between the portrait. However, if your application targets API level 12 or lower, then your activity always processes this configuration change (this configuration change does not restart your activity, even if it runs on an Android 3.2 or higher device). Added to API Level 13.
EDIT: here is my simple code to show that it works:
public class MainActivity extends Activity { @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.i("Message","inside oncreate()"); } @Override public void onConfigurationChanged(final Configuration newConfig) { super.onConfigurationChanged(newConfig); Log.i("Message","inside onconfigurationchanged()"); } }
manifest:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.test" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"> <activity android:name="com.example.test.MainActivity" android:label="@string/app_name" android:configChanges="orientation|screenSize"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
source share