Hi all I'm using a Samsung Galaxy Ace S5830 and I wanted to test a "Snake (Game)" app.

When I launched the app, this is what I have:

enter image description here

Samsung Galaxy Ace does not have an "Up" button, I was wondering what are the steps I'd have to take to simulate one?

  • As far as I'm aware no Android phones, other than the Xperia Play (Playstation phone) have an up button. Have you tried just swiping up the screen? There's a few Snake clones on the Market, do you have a link to the Market page for this game, so someone else could try? – GAThrawn Jan 10 '12 at 16:18
  • @GAThrawn I've swiped it but it doesn't work. I can't seem to do anything to make the app respond at all. Btw it's one of the "sample apps" which came along with the Android SDK installation. – Pacerier Jan 10 '12 at 16:33
  • No VOLUME up button? – Chance Jan 10 '12 at 18:03
  • @Chance I have the volume up button, except that it isn't making the app responding – Pacerier Jan 10 '12 at 19:40
  • @GAThrawn lots of android phones have hardware keyboards with d-pads. It may not be the same key code, but they definitely have an "up" button. – TREE Jan 10 '12 at 19:55

GO keyboard also has an up button.

You'll just need to launch the editor.


1) If this game has to tested on your device and if you have the source code of the project you can disable or change the listener of button or what components it may be. The constants for catching the up button click event you may see in the Activity.class is the following;




You can change this constant with other KeyEvent constants. See link : http://developer.android.com/reference/android/view/KeyEvent.html

2) If this game doesn't have to be tested on your physical device, then there is emulator option whose virtual keyboard has many buttons. While creating Android Virtual Device you have a bunch of screen options, ram storage, etc. You can create virtual device whose hardware is almost same with your physical device. after that you can push the .apk file by using adb-install command and test it on virtual device.


Im not familiar with your device, is the big thing in the middle on the bottom a trackpad type device? I.E. can you use it to scroll a long page if you rub your finger over it like you would a laptop trackpad?

If so then rubbing that thing with an upward motion should send the DPAD_UP event, which I assume that game is listening for. You might also try pressing on the top edge of this button thing, perhaps the whole thing is a dpad of sorts.

If that thing isn't able to scroll at all then Im afraid you're probably s.o.l. The game is listening for an event that your device is incapable of sending. If you are interested in development then let this be a lesson to consider all device types and input schemes when designing your interface.

{rant} What is with the trackball hate? The first several devices had trackballs on them, and it was an excellent input method, now they've moved them all to this optical / touch sensor crud {/rant}

EDIT: So even if your device doesn't have any type of trackball type device you aren't entirely SOL after all. https://market.android.com/details?id=com.pedrocorp.virtualtrackball&hl=en that is an app that will give you a virtual d-pad or trackball. There might be a free one if you search around.

P.S. if anyone with influence over hardware design happens to see this: Making a device with no d-pad type input is terrible, it makes so many interactions needlessly awkward. Please don't do it.

  • Do I actually need to pay for a virtual keypad? – Pacerier Jan 10 '12 at 22:33
  • If you use that one then yes(Sucks that samsung screwed you on that). If you search around there might be a free one on the market(I don't know for sure though). Note also this app is for rooted devices only. – FoamyGuy Jan 10 '12 at 22:44

Well, if you have cyanogen, you could download swype, and go into the settings of cyanogenmod to show the keyboard on menu hold. Then you could go into the edit menu, and press the up button.


adb shell input keyevent MENU, then press the "Start" on the menu


If you are testing snake from the Android applications examples, you should modify the code in order to include the gesture class. I simply have done this by hooking the event_key manager by the gesture events. Good training to get familiar with the gingerbread API :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.