The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Bluetooth keyboard start/stop on Android problem
EternalLands


Joined: 01 Dec 2016
Posts: 16
I am having a problem on Android.
If I start or stop my external BT keyboard, then the OS is terminating the application. I get the "app will be terminated" event, and if I don't do an exit() then really bad things will happen.

Here is what the log says:
Code:

I/EventHub( 1741): New device: id=16, fd=197, path='/dev/input/event6', name='Bluetooth  Keyboard', classes=0x80000003, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychar/Generic.kcm', builtinKeyboard=false, wakeMechanism=EVIOCSSUSPENDBLOCK, usingClockIoctl=true
I/InputReader( 1741): Device added: id=16, name='Bluetooth  Keyboard', sources=0
x00000101
I/ValidateNoPeople( 1741): skipping global notification
I/ActivityManager( 1741): Config changes=30 {1.0 ?mcc?mnc en_US ldltr sw600dp w960dp h527dp 320dpi lrg land finger qwerty/v/v -nav/h s.116}
D/#       ( 3046): w=1920 h=1200
I/InputAttributes( 2073): InputType.TYPE_NULL is specified
V/SDL     ( 4915): onPause()
V/SDL     ( 4915): nativePause()
V/SDL     ( 4915): onDestroy()
I/SDL/APP ( 4915): OS is terminating us...


Any ideas? Did anyone else experience this issue?
EternalLands


Joined: 01 Dec 2016
Posts: 16
Well, I solved it. I added "keyboard" in android:configChanges="keyboardHidden|keyboard|orientation|screenSize" in the manifest file, and it works just fine Smile