has Physical Keyboard
import android.content.Context; import android.content.res.Configuration; class Main { public static boolean hasPhysicalKeyboard(Context context) { int keyboard = context.getResources().getConfiguration().keyboard; return keyboard == Configuration.KEYBOARD_QWERTY; } }