I would like to detect if the current users phone has a hardware keyboard or only a on-screen keyboard. Is this possible with the SDK?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, you can.
Fetch the Configuration object using
…and then look at the
keyboardfield.If they value of
keyboardis not KEYBOARD_NOKEYS, the user has a hardware keyboard.Note that as @Carl says in his comment below, the user may attach a USB keyboard at any point while your app is running, causing the value of
keyboardto change.