The Titanium window UI will disappear when doing the following on Android:
- Connect or disconnect a bluetooth keyboard.
- Open or close a phone's slide-out keyboard. (Like the old Droid devices.)
Steps to reproduce:
- Connect a bluetooth keyboard to an Android device.
- Launch a Titanium app on that device.
- Turn off the bluetooth keyboard (or pull the batteries out).
The UI disappears when the keyboard disconnects.
Titanium generates an "AndroidManifest.xml" when doing an Android build. The Titanium <activity/> elements have an "android:configChanges" attribute which are missing the "keyboard" value. This is needed to override the Android OS' default behavior of destroying the activity and recreating it when a keyboard disconnects. (We overriding the "orientation" change event for the same reason.)
We need to updating Titanium's "AndroidManifest.xml" template and/or "_build.js" to automatically add the "keyboard" setting to all activities that do not load UI from XML such as the root activity, TiActivity, JSActivity, etc.
Add the following to the "tiapp.xml" to override the the "keyboard" handling yourself. Note that the activity name is based on the app's name. If the app's name is "MyAppName", then the activity name will be "MyappnameActivity".