Hos*_*ork 34
"getResources().getConfiguration().键盘提供的标志是检查哪个键盘(如果有)可用的好方法." [1]
http://d.android.com/reference/android/content/res/Configuration.html#keyboard
To detect common qwerty keyboard connected use this:
private boolean isKeyboardConnected() {
return getResources().getConfiguration().keyboard == KEYBOARD_QWERTY;
}
Run Code Online (Sandbox Code Playgroud)