Handling the configuration change on Android
Unsolved
Mobile and Embedded
-
Hi All,
We are trying to run our application in an usual environment wherein the Android tablet is connected to a hub. This hub provides an outlet to 'Bluetooth Keyboard' receiver and another for charging the device.
We see that only in this environment we see two problems:- On connecting the Bluetooth keyboard, the application becomes blank. We see that the activity is restarting itself.
However, we added the following in manifest:
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qt.myActivity" android:label="myApp" android:screenOrientation="landscape" android:launchMode="singleTop" android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen">
Since the keyoard configuration is already added here, we are not able to understand the problem configuration which is causing the problem.
We tried logging the old and the new configuration :
Old Configuration:{1.0 ?mcc?mnc [en_IN] ldltr sw800dp w1280dp h728dp 160dpi xlrg land finger qwerty/v/v -nav/h winConfig={ mBounds=Rect(0, 0 - 1280, 800) mAppBounds=Rect(0, 0 - 1280, 752) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_90} s.5}
New configuration before activity restart:
{1.0 ?mcc?mnc [en_IN] ldltr sw800dp w1280dp h728dp 160dpi xlrg land finger qwerty/v/v dpad/v winConfig={ mBounds=Rect(0, 0 - 1280, 800) mAppBounds=Rect(0, 0 - 1280, 752) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_90} s.7}
- When we power off the tablet in this environment, the application crashes abruptly which seems strange.
Note: This problem doesn't occur on Android 8 tablet. We could identify this problem on Android 10.
- On connecting the Bluetooth keyboard, the application becomes blank. We see that the activity is restarting itself.