# Android keyboard with predictive text passes through single character

**URL:** <https://forum.juce.com/t/android-keyboard-with-predictive-text-passes-through-single-character/19715>\
**Category:** Android\
**Created:** [October 31, 2016, 3:06pm UTC](https://forum.juce.com/t/android-keyboard-with-predictive-text-passes-through-single-character/19715 "2016-10-31T15:06:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike-e](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mike-e](https://forum.juce.com/u/mike-e)\
**Post date:** [October 31, 2016, 3:06pm UTC](https://forum.juce.com/t/android-keyboard-with-predictive-text-passes-through-single-character/19715/1 "2016-10-31T15:06:06Z")

</div>

Hi,

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.

Best,

Mike

---

<div class="post-metadata">

**Author:** ![mike-e](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mike-e](https://forum.juce.com/u/mike-e)\
**Post date:** [November 8, 2016, 2:07pm UTC](https://forum.juce.com/t/android-keyboard-with-predictive-text-passes-through-single-character/19715/2 "2016-11-08T14:07:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [November 9, 2016, 12:43pm UTC](https://forum.juce.com/t/android-keyboard-with-predictive-text-passes-through-single-character/19715/3 "2016-11-09T12:43:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mike-e](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mike-e](https://forum.juce.com/u/mike-e)\
**Post date:** [November 14, 2016, 10:51am UTC](https://forum.juce.com/t/android-keyboard-with-predictive-text-passes-through-single-character/19715/4 "2016-11-14T10:51:39Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [November 14, 2016, 11:11am UTC](https://forum.juce.com/t/android-keyboard-with-predictive-text-passes-through-single-character/19715/5 "2016-11-14T11:11:11Z")

</div>

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