I'm writing an application for Android Things that requires support for a standard usb keyboard wedge handheld barcode reader, and should show soft keyboard input for arbitrary text entry.
As an Android Things app, I'll be building my image and pushing out OTA updates through the Android Things Console.
My understanding is that the only way to have BOTH a keyboard wedge AND allow soft keyboard input (without requiring user interaction) is to set the secure setting SHOW_IME_WITH_HARD_KEYBOARD = 1, which cannot be done programmatically, because it requires the WRITE_SECURE_SETTINGS permission, which the OS won't grant. Furthermore, since production images from AT Console won't allow debugging by default, I won't be able to set this with adb, either (which would also be a pain, anyway, since that would mean flashing an image, setting the setting, then re-creating a new image with the setting set, etc.).
Is there any way to achieve what I'm trying to do programmatically?