Keyboard not working properly

I’m trying to get my text field to receive text typed by the user, and included the TextFieldTTF control in my Android + iOS app.
However, while testing on Android, the first time I call attachWithIME() to launch the keyboard, it pops up, showing the keys on the lower half of the screen, but nothing happens. No matter what I try to type it simply does nothing.
Then if I close it and open again, the keyboard is presented again, but this time with the upper half of the screen showing the system input. And this second time it works, passing the text to my text field.

Even if I use setIMEKeyboardState(true), the first time it is called, the same bad behavior happens.
Any ideas?