I wondered if it is possible within B4A to detect whether or not a device has a hardware keyboard? As a more general question, is it possible to detect what features a device actually has in it?
You can use this method (requires Refection library):
B4X:
Sub HardwareKeyboardPresent As Boolean
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod("getResources")
r.Target = r.RunMethod("getConfiguration")
Dim keyboard As Int = r.GetField("keyboard")
Return keyboard <> 1 'KEYBOARD_NOKEYS
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.