sunil
sunil

Reputation: 51

softkeyboard not working when barcode scanner is connected to tablet

InputMethodManager imm = (InputMethodManager)getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE); 
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);

Using this code also soft keyboard is not appearing when barcode scanner is connected please help with this

Upvotes: 5

Views: 1274

Answers (2)

reis_eliel
reis_eliel

Reputation: 328

Android can only have one keyboard connected at a time.

The scanner counts as a keyboard.

Upvotes: 0

RedSun
RedSun

Reputation: 45

I found solution and it worked for Nexus 4.4.2

if(getResources().getConfiguration().hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO){
        InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.showInputMethodPicker();
    }

You have to disable hardware keyboard on the popup message.

Upvotes: 2

Related Questions