Search Unity

Impossible to detect canceling of Android Keyboard

Discussion in 'Android' started by zugzwang, Jul 20, 2015.

  1. zugzwang

    zugzwang

    Joined:
    Jan 12, 2011
    Posts:
    24
    It seems this is a very old bug still unresolved.

    If you touch outside the Android keyboard, it is correctly dismissed, but TouchScreenKeyboard.wasCanceled remains false, while TouchScreenKeyboard.done is set to true (this one as expected).

    The correct behavior occurs if the user dismisses the keyboard by pressing the back button. In this case wasCanceled is set to true.

    So, there is no way to detect if the user dismissed the keyboard by clicking outside of it (which I assume is by far the most common way to close the keyboard when you want to cancel the action).

    If I build a chat for my game, Android users will get super pissed off when the text they didn't want to submit anymore suddenly appears in the chat log after he "dismisses" the keyboard by touching outside of it.

    Am I wrong?
     
  2. zugzwang

    zugzwang

    Joined:
    Jan 12, 2011
    Posts:
    24
    No one has ever programmed a chat in a mobile game with Unity?
    If so, please share with me the solution.
     
  3. plottsjp

    plottsjp

    Joined:
    Apr 2, 2015
    Posts:
    13
    I am seeing the same thing. To get around this our app requires hitting an on screen button to submit a form (login, for example) instead of reacting to the TouchscreenKeyboard.

    good luck on your game!
     
  4. noamgat

    noamgat

    Joined:
    Nov 22, 2009
    Posts:
    125
    We are running into the same issue. Any proper solution to this?
     
  5. noamgat

    noamgat

    Joined:
    Nov 22, 2009
    Posts:
    125
  6. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    any update on this? still seeing issues with 5.5.3p4
     
  7. HuntNight

    HuntNight

    Joined:
    Mar 12, 2014
    Posts:
    1
    Have the same problem. Are there any updates?
     
  8. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    Note: landscape apps avoid the issue because the keyboard goes to fullscreen. It is a problem for portrait apps