Reputation: 51
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
Reputation: 328
Android can only have one keyboard connected at a time.
The scanner counts as a keyboard.
Upvotes: 0
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