I want to prevent my application from restarting when orientation of device changes. I have lock the app orientation as per below code but it doesn't help for the same.
<activity android:name=".CheckMemory"
android:configChanges="orientation"
android:screenOrientation="portrait"
android:theme="@style/customTheme"
android:label="@string/app_name">
</activity>
and
@Override
public void onConfigurationChanged(final Configuration newConfig) {
super.onConfigurationChanged(newConfig);
//Do nothing here
}