Page 1 of 1
Android-keyboard and text input
Posted: Thu May 12, 2016 8:30 am
by tohe
It seems that I cannot get input from Android - keyboard (I'm running 6.1 and compiled APK's).
Both:
s$ = InKeyStr(#ALPHABETICAL)
and
a$ = StringRequest(.... )
will return emptry string when running on Android (of course I also use
ShowKeyboard() +
HideKeyboard())
Any suggestions so I don't spend too much time implementing something that might already exists

Re: Android-keyboard and text input
Posted: Fri May 13, 2016 8:13 am
by PEB
You need to use
InstallEventHandler() with the table field OnKeyDown (or OnKeyUp) and then keep track of what comes through msg.key.
Re: Android-keyboard and text input
Posted: Fri May 13, 2016 8:56 am
by tohe
- first thanks for answer, but as said I would rather keep things simple and as it works on other platforms I expect it to work similar way on Android too.
and update to this, incase someone else is wondering with the same issue:
- It *does* work on Android if you set up the predictive text input off and character preview off from Android settings (my devices run 4.0.4 and 5.1 Android OS and use Samsung keyboard)
Re: Android-keyboard and text input
Posted: Sat May 14, 2016 12:48 pm
by airsoftsoftwair
Can you post a full script that doesn't work for you? But please make it as short as possible.
Re: Android-keyboard and text input
Posted: Mon May 16, 2016 8:15 am
by tohe
So I just tried following short clip and compiled apk:
1. it works if I have Samsung keyboard
without predictive text input (and word selection bar) on
2. if I turn Samsung keyboard on with predictive text input - nothing is displayed (and s$ is empty)
same code works on any other platform + Android if you just have 'right settings for Android keyboard'.
Code: Select all
t = GetVersion()
If t.platform = "Android"
ShowKeyboard()
EndIf
Locate(100, 200)
s$ = InKeyStr(#ALPHABETICAL, 8)
If t.platform = "Android"
HideKeyboard()
EndIf
Re: Android-keyboard and text input
Posted: Wed May 18, 2016 5:09 pm
by airsoftsoftwair
Hmm, the problem is that I don't have any devices running the Samsung keyboard here. It is working fine on my Nexus devices with the Google keyboard. I need to see if I can borrow a Samsung device from a friend to debug this or can the Samsung keyboard be installed on Nexus devices?
Re: Android-keyboard and text input
Posted: Wed May 18, 2016 6:51 pm
by tohe
airsoftsoftwair wrote:Hmm, the problem is that I don't have any devices running the Samsung keyboard here. It is working fine on my Nexus devices with the Google keyboard. I need to see if I can borrow a Samsung device from a friend to debug this or can the Samsung keyboard be installed on Nexus devices?
I tried to download different keyboards like Swype and Swiftkey and those seem to work. So it seems that only Samsung keyboard with predictive text input is affected, just happened to be the same as I had as default
