How to detect hardware keyboard presence?

Marcus picture Marcus · Mar 10, 2010 · Viewed 18.3k times · Source

Is there a way to detect if the device I'm currently running on has a hardware keyboard installed?

How do I query device capabilities anyway?

Answer

"The flags provided by getResources().getConfiguration().keyboard are a good way of checking which keyboard (if any) is available." [1]

http://d.android.com/reference/android/content/res/Configuration.html#keyboard