Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / T2 Soft or Hard Buttons

Author
Message
keitaroguy
7
Years of Service
User Offline
Joined: 18th Nov 2011
Location:
Posted: 20th Dec 2011 05:39
So I'm developing on the Xoom but this applies to any android device. How do I code so the buttons do things like the menu button will pop up my menus and also how to make the soft keys do things. Also Can do actual java code to do certain things?
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Dec 2011 15:55
The back button is coded as key code 27 (same as escape on Windows), home always quits the app. I'll have to look up the settings button and see if I can get that in there as well.
The Zoq2
9
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 20th Dec 2011 16:44
I tried to just print the "GetRawLastKey()" Like paul said the "backButton" is 27 but the menu button shows 0.
keitaroguy
7
Years of Service
User Offline
Joined: 18th Nov 2011
Location:
Posted: 20th Dec 2011 19:56
The Home Button Doesn't seem to completely close the application leaves it running in the background I'm having trouble making it come back from that. I just gives me a black screen where it won't do anything til I make it crash. any tips for that? Thanks!
keitaroguy
7
Years of Service
User Offline
Joined: 18th Nov 2011
Location:
Posted: 20th Dec 2011 20:09 Edited at: 20th Dec 2011 20:18
Also Even if I put this code in how do I find out what buttons I'm pressing if I press the home button wouldn't it just close? Also if I do press the Home button to close is there a way to make sure it actually closes all the way? Also is there a way to tell states? Like if I get a phone call I would like to make it save all the info. Thanx!

Login to post a reply

Server time is: 2019-07-23 10:43:50
Your offset time is: 2019-07-23 10:43:50