5
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

Echilon
  • 10,064
  • 33
  • 131
  • 217
sunil
  • 51
  • 3

2 Answers2

2

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.

RedSun
  • 35
  • 7
0

Android can only have one keyboard connected at a time.

The scanner counts as a keyboard.

reis_eliel
  • 338
  • 2
  • 7