I have a USB barcode scanner and I hope the virtual keyboard can still appear in EditText objects even if the barcode scanner has been connected. I can achieve this through the following code:
Settings.Secure.putString(getContentResolver(), "show_ime_with_hard_keyboard", "1");
This program execution requires special system permissions in AndroidManifest.xml:
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
The code runs well and the virtual keyboard can appear when testing. But I could not build my app in Android Things Console because of permission denied.
Failed to load apps Permission denied.
[app-debug.apk] has prohibited permissions: android.permission.WRITE_SECURE_SETTINGS Error in Android Things Console
Does anybody know how to build my app as system app of android things or the solution to this problem?