Keyboard doesn't show up on Android 11 when the input field is hidden

Currently using hide input field option prevents the on-screen keyboard from showing up on devices with Android 11. We are making the quick workaround by changing how the input field is hidden. After the workaround is implemented, the input field as well as the text in it will be transparent. That is not an ideal solution, but it's the fastest and safest fix for now.
We are planning to make the fix in all currently supported Unity versions.
The issue can be tracked here

Edit: The fix was made in these Unity versions: 2018.4.29f1, 2019.4.13f1, 2020.1.11f1 and 2020.2.0b10.


Is there an ETA on this workaround?

@JuliusM the fix does not work in 2018.4.28f1 as you can clearly see from the reports:

Is there any way to reopen an issue?

1 Like

The fix is present in 2018.4.29f1, and not in 2018.4.28f1

The issue gets marked as resolved in the issue tracker when the QA verifies it. That means there can still be a period of time when the issue is marked resolved, but the version which contains the fix is not yet released.

As Tomas has said, for 2018LTS the fix will be available with 2018.4.29f1. The fix was also made in 2019.4.13f1, 2020.1.11f1 and 2020.2.0b10.

1 Like

My bad, sorry, I misread the release notes of 2018.4.28 … it lists it as a known issue, I read it as a fix.

I'm going to challenge the acceptability of the workaround Unity has used to circumvent the issue.

A) The input field is not completely hidden. The following images demonstrate underlining and highlighting still being shown just above the keyboard with the 'hidden' input field.

B) The 'hidden' input field still blocks raycasts, preventing touches from propagating to the intended target. This has caused a significant number of issues for clients, as they are unable to interact with the app as expected. The effect is minimal with short strings, but long inputs can block touches over a significant portion of the screen. This can be seen in second image above as it prevents the buttons from being pressable.

Which Unity version do you use and on which device do you see this behavior? Does it happen on other devices as well? From what I remember, it should not be possible to interact with the game elements while the keyboard is open, so these issues would not happen. There was one device that was working differently (I can’t remember which one now), but everything else that our QA tested behaved the same. Maybe this behavior is present only in Unity 2019 and up.

We're currently using 2019.4.15f1. The visible artifacts are present on my Samsung Galaxy S8, and I suspect the keyboard I'm using (Fleksy) may be partially to blame for the visible highlighting.

Historically (on Android) the first tap on the screen when the keyboard is active will not interact with onscreen elements, but it does serve to dismiss the keyboard. This two tap process is an unpleasant user experience issue on it's own, but at least in this scenario, a user trying to tap one of the buttons in the previous photo may have to tap twice, but they would be able to tap the button and perform the action. The new hidden input field blocks touches from dismissing the keyboard as our users have come to expect, and so they would have to tap elsewhere on the screen (outside of the area blocked by the transparent text field) to dismiss the keyboard, before being able to tap the button.

Still haven't heard anything back on this, and we continue to receive customer complaints. Is this issue going to be addressed?

I agree with @leedan_johnson . I have been waiting for a fix for this for a long long time now. The 'fix' where simply not rendering the input field is terrible! It's still super messy in 2020.1.16f1 and simply unusable. It blocks raycasts and you can still select stuff in the invisible input field. I have attached a screenshot of the issue.

Isn't an input field one of the most basic things you can have in an app? Why is it so hard to get this right?

Edit: The screenshot is from a Pixel 2.

Edit: Also tested it on 2020.2.1 but has the same issue (Pixel 2). Here another screenshot:

New issue tracker for this:

I really don't think issues like this should be considered resolved until they are backported to all active LTS distributions. The problem is NOT fixed for us, and we've been receiving customer complaints for 9 months. Issues like this that appear to completely fall off Unity team's radar have us seriously considering migration to another platform.

We are having this issue on Unity 2019.3.13 with TextMeshPro on Android 11. On some devices get fixed by unchecking Hide Mobile Input. Users must be logged in to use the app...

This workaround is not working in 2019.3.15f1. Please fix it!!

Previously, there was a bug in the engine that the keyboard is not displayed on some Android devices. You fixed it in Unity version 2019.4.13. To get the fix, I upgraded to version 2019.4.29f1. After that, a bug appeared that there is a small area above the keyboard that does not catch touches in the UI.
At the same time, in the Google report, it seems like it is even marked as content without a label. Here is an example of his screenshots.

Images: moto e5 play, Android 8.1 (SDK 27) Galaxy S9, Android 8.0 (SDK 26)

Hi Julius and Tomas, unfortunately the issues described by others above (underlining showing up and the input field blocking click raycasting) are still happening with TouchScreenKeyboard.hideInput. In addition, clicking in the area of the input field while the keyboard is open is triggering a cascade of errors closing the keyboard completely.

I submitted a new bug report and posted a thread summarizing what I am seeing here .

Would you guys be able to take another look at the issue with current devices and current Android/Unity versions? I have been using a Samsung S21+.

If you do not have the time or resources to work on a solution currently, would you be willing to share the Android code you are using in Unity with TouchScreenKeyboard.hideInput so we can try to modify it ourselves into something that might work?

Or at least let us know how to access the input field so we can try to experiment. For example, in Unity, I can get keyboard height with:


        using (AndroidJavaClass UnityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
            AndroidJavaObject View = UnityClass.GetStatic<AndroidJavaObject>("currentActivity").Get<AndroidJavaObject>("mUnityPlayer").Call<AndroidJavaObject>("getView");

            using(AndroidJavaObject Rct = new AndroidJavaObject(""))
                View.Call("getWindowVisibleDisplayFrame", Rct);
                int freeHeightInRawScreenPixels = Rct.Call<int>("height");
                return (int)((Screen.height - freeHeightInRawScreenPixels) * scalingFactor);

If you could share with us any basic method to similarly find and access the input field perhaps we can all work together on finding a solution. Presumably, the ideal solution would be to move it off screen by shifting it by several thousand in any direction.

Alternatively, we will need some way to hide the underlining that is still showing up from it and stop it from catching clicks and creating errors.

Thanks for any help you can provide. I think many of us very much do need this function. It’s critical for me certainly and I don’t mind digging through Android documentation or experimenting to help find a solution if you can provide a starting hint for me to work from.

The keyboard not showing up when the input field is hidden on Android 11 is likely due to a bug in the operating system. This bug is known to cause input fields to become invisible to the operating system and prevent the keyboard from popping up. Unfortunately, there is no known workaround for this issue at this time. However, the Android team is aware of the issue and is likely working on a solution. For now, you may have to wait until a patch is released to fix the issue.