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
Android-keyboard and text input
Re: Android-keyboard and text input
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
- 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)
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)
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Android-keyboard and text input
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
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'.
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
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Android-keyboard and text input
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
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 defaultairsoftsoftwair 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?