Android keyboard with predictive text passes through single character


I am having a problem with an android app where soft keyboards will only send across one character to a target texteditor component if predictive text is switched on. Predictive text is not a particularly important feature for us on this app, but my efforts to switch it off have so far fallen flat.

I’ve seen it suggested that setting outAttrs.inputType in onCreateInputConnection to TYPE_TEXT_FLAG_NO_SUGGESTIONS might turn predictive text off. Using android studio I have been able to put breakpoints in my .java file and found that when the texeditor component gains focus ‘showKeyboard’ is called as expected, but breakpoints set in onCreateInputConnection are not being hit at any point in the programs run. Is this expected?

This problem was seen on a Galaxy Tab A running 6.0.1 and a Nexus 7 running Android 4.4.2, with an app build using JUCE 4.2.3.



Any suggestions for a fix or a workaround would be greatly appreciated?

As the JUCE text boxes are not native text boxes there is no easy way to support predictive test. Also TYPE_TEXT_FLAG_NO_SUGGESTIONS does not work reliably on many android phones. We have this problem on our backlog and we are currently thinking about ways to fix this in future versions of JUCE.

Thanks for getting back to me. Not sure what to do about this one, we only use the one text-editor box for password access so it’s not the ‘point’ of the app, but annoyingly it’s the first thing the user sees.

Is there any issue tracking or timelines for issues like this or is it just a case of keeping an eye on the git logs?

You could create the text-entry box as a native dialog or activity and then load up your JUCE activity?