• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps arrow keys for smartphones

zollen

Newbie
Does Android 3.2 smartphones all support arrow/direction keys? If so, what are the keyCode for the four keys?

does KeyEvent class already defined these keys?
 
There no such thing as an smartphone running Android 3.2. Android 3.x is for tables only, and none of them AFAIK have directional keys.

Even if you meant Android 2.3, there are many many Android 2.x devices that don't have directional keys.
 
I am writing a game where a spaceship will be able to move up/down/right/left. What would be the best way to navigate the spaceship? If keyboard is used, what keys would be best for this purpose? What are the identifiers in KeyEvent class?
 
KeyEvent class, along with all Android classes, is documented in the Reference tab of developer.android.com

I would consider any kind of keyboard as being an optional, unlikely feature. Devices with keyboards are from the past before Android went touch. Code for keyboard-less devices with a touch screen.

So you need to devise a user-experience whereby the user is touching on-screen controls. Perhaps as a secondary user-experience if a user has a device that has a directional keys, the user can use those keys instead. But the primary user-experience will need to be on-screen controls.
 
Back
Top Bottom