We have an application that runs on a barcode scanner android device (ScanSKU). And whenever the user is scanning anything the keyboard will show up as it "types" the text they scanned, and will block half of the screen.
Our application is basically a WebView and we still need to be able to focus form elements inside of it.
But is there anyway we can build a toggle to disable the on-screen keyboard from coming up while they are in the WebView?
I've tried using this:
// Check if no view has focus:
View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
From: Close/hide the Android Soft Keyboard
But with no success.
Any suggestions or ideas on how I can go about this?