Bug 1117

Summary: Soft keyboard doesn't work anymore on Android 5.0 Lollipop
Product: [JogAmp] Newt Reporter: Brice Figureau <brice.figureau>
Component: embeddedAssignee: Sven Gothel <sgothel>
Status: UNCONFIRMED ---    
Severity: critical    
Priority: ---    
Version: tbd   
Hardware: embedded_arm   
OS: other   
Type: --- SCM Refs:
Workaround: ---

Description Brice Figureau 2015-01-08 17:47:06 CET
Tested on nexus 4/nexus 9/nexus 5 running Lollipop.

When displaying the default Google soft keyboard, and then touching the various keys nothing happens. Instead of firing KeyEvent events or triggering the SurfaceView onKey listener, the application receives touch events as if the keyboard was below the SurfaceView, except we can see it so it's above. It looks like if the keyboard was not intercepting the touch event, and then the OS forwards them to the view below.

Normal KeyEvent still works with other keyboards like swiftkey or the hacker's keyboard (which is an old Google Keyboard fork).

I have no clue yet on why the latest Google Keyboard behaves like this. I tried to read the LatinIME android source code to see if any changes introduced since android 4.4 would be the root cause, but I couldn't spot anything obvious.

Things I tried that didn't work:
* Implemented onCheckIsTextEditor to return true in MSurfaceView
* returning an InputConnection from MSurfaceView (ideas from http://stackoverflow.com/a/7386854)

I was able to make it work if I create a fake EditText below the SurfaceView, but as soon as the keyboard is shown, this EditText pass frontmost and takes all the screen (certainly because the app is a fullscreen app), which is not what we want.

I don't have a simple example to show, and I'm not sure there's a jogl sample exercising the keyboard features.

Any ideas?