Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

softkeyboard not working when barcode scanner is connected to tablet

Tags:

android

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

like image 740
sunil Avatar asked Nov 03 '22 09:11

sunil


1 Answers

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.

like image 91
RedSun Avatar answered Nov 14 '22 23:11

RedSun