How to detect hardware keyboard presence?
[android-developers] Re: Detect Physical Keyboard Layout (ex: QWERTY vs QWERTZ) The flags provided by getResources().getConfiguration().keyboard are a good way of checking which keyboard (if any) is available.