Hi all,
I've recently started Android development for a personal project. The purpose is adding a custom launcher on my car's infotainement system (=Android system based on version 4.1.1).
Currently I'm searching for a way to capture input of one of the physical hardware buttons. There are two types of this button: one for controlling the volume and one for controlling the brightness of the screen.
In my launcher however, I'd like to use this second button for controlling the selection in the main menu, like BMW and Audi systems where you turn and push the knob. You can turn and push this button the same way.
The only question is: how can I capture these inputs in code? Buttons like HOME and BACK have predefined constants, but what about this 'turn'-button?
Any help is much appreciated!
Greetings!
PS:
As I'm new to the forum, I can't post an image (yet) to give you guys a better view of the button.
NVBMW said:
Hi all,
I've recently started Android development for a personal project. The purpose is adding a custom launcher on my car's infotainement system (=Android system based on version 4.1.1).
Currently I'm searching for a way to capture input of one of the physical hardware buttons. There are two types of this button: one for controlling the volume and one for controlling the brightness of the screen.
In my launcher however, I'd like to use this second button for controlling the selection in the main menu, like BMW and Audi systems where you turn and push the knob. You can turn and push this button the same way.
The only question is: how can I capture these inputs in code? Buttons like HOME and BACK have predefined constants, but what about this 'turn'-button?
Any help is much appreciated!
Greetings!
PS:
As I'm new to the forum, I can't post an image (yet) to give you guys a better view of the button.
Click to expand...
Click to collapse
Hello,
Thanks for using XDA Assist.
You can post your query in Android Q&A,Help and Troubleshooting.Experts there may be able to help you
___
v7
XDA Assist
Thx v7, I've posted the question on the forum you requested
Related
Mods, would it be OK to maintain a "wish list" for mods or additions here in the Dev forums so that chefs / developers can take ideas and cuss from there. Kind of like a "meter" to see what the biggest (software) issues of the users with the device are?
If thats not desired here in this subforum please move or delete this.
My first suggestion would be the "Three dot menu fix" already out for the One X by blubbers. The new buttons on the lower end of the screen take some using to. I still miss the menu and search key.
Ideally it would be awesome to get the entire three key panel hacked to allow multi-custom presses. Such as:
Left "<" Press once for back, press and hold for task switcher
Middle Home button: Once for homescreen, double tap for Apps drawer?
Right key: Tap once for old school menu, double tap for quick-search launch
Maybe even triple uses are possible later on, such as press and hold, with either hard coded functions or customizable functions.
---
Second Idea:
In standby mode when playing music the side volume rockers modify volume which is nice. Maybe it is possible to modify / enhance the behavior to do a previous / next track skip by pushing and holding the upper / lower vol key, while maintaining the volume adjustments on short presses.
I know this is probably quite far off as the development is just kicking into gear, but a collection of such ideas might be a nice thing to have, although it might be the wrong subforum for such a collection.
Thanks for your attention
have a look at the virtuous rom, it already features some of the changes you want...
Quote: "Remaped buttons (Long press Home -> Recent apps, Recent apps -> Menu) (Thanks lyapota)"
http://rootzwiki.com/topic/20859-rommar-24villes-seriesvirtuous-one-s-v120/
Another one might be to allow the 4 shortcuts on the lockscreen to be different from the ones in the dock. I know I don't always want them to be the same. This was one of the better features of sense 3 which has been lost.
Sent from my HTC Desire using XDA
Number 1 this is the wrong section to post it in should have been posted at "One S General" and it's not a good way to start off the phone by requesting things.
Thread moved to general... this is a wish list... not development
And I would add that wishlists are so specific to each person, maybe you should create a poll or something to see which general wishes people have so that a ROM can be made to satisfy as many people as possible...
I like that idea! Would it get rid of the big black bar with the 3 buttons coming up on some games? Hate that so much!
EDIT: Having had a look at that new ROM looks nice. Going to have to learn how to do it at lunch!
Does anyone know how the virtuous is getting on?
The phones rooted now anyone busted the uptake kitchen yet? Or tried sys tune. Not even got my phone yet lol
I think in regards to mods...toolsets wont take long to appear the biggest question is will asop ever arrive I know quite a few devs have gone to the x...
Forgot to ask...anyone tried changing dpi yet?
Sent from my Desire HD using XDA Premium App
The virtuous team is over at rootzwiki
Hello everyone,
I am trying to develop a lockscreen type application. I managed to disable the back key on all platforms but the home key only for phones with hardware buttons. I used TYPE_KEYGUARD to disable the home key. However, the home key on ICS and JB nav bars still function.
WidgetLocker apparently uses root to completely disable home and recents (the icons don't even show up). I am not that familiar with root app development. Is there an android API or root library that can be obtained through root to disable the keys?
Any help would be appreciated!
kevdliu said:
Hello everyone,
I am trying to develop a lockscreen type application. I managed to disable the back key on all platforms but the home key only for phones with hardware buttons. I used TYPE_KEYGUARD to disable the home key. However, the home key on ICS and JB nav bars still function.
WidgetLocker apparently uses root to completely disable home and recents (the icons don't even show up). I am not that familiar with root app development. Is there an android API or root library that can be obtained through root to disable the keys?
Any help would be appreciated!
Click to expand...
Click to collapse
Your asking a question, so use the damn Q&A forum. Or read this. Your a senior member with over 500 posts, you should know better by now...
my bad sorry. Saw a lot of questions and the thread "{HELP} Interactive Help Forum!{TUTORIALS} Where questions are encouraged!" so I posted my question here. Probably should have also read the thread below that too.
Can a mod move this to Q&A?
Thanks
I am currently working as a visual/XML designer/coder in a team of 2 for making small-time apps for the Android market. I have a button in the XML layout, but I need that button to be set as a SurfaceView button so that it can later be changed into a real-time graph. Can anyone lend me a hand and let me know how, in the XML coding, I could set this specific button to Surface View? Thank you in advance for the help.
Hey, before anything thank you for your time. So I'm coming from the Samsung Galaxy Light and very much prefer the old hard key setup. For instance the recent apps button was the menu button and I simply had to long-press the home button to view recent apps. I wish to revert to these old settings. I have already rooted this device and flashed/installed xposed framework. I figured out how to to edit the key layout file called "Generic.kl" and have already changed the recent apps key to menu, however I cannot figure out how to change long-press home to the recent apps key and have decided to search for help. I wasn't able to find anything on search engines concerning my issue and have resorted to this forum.
What do I have to do to remap longpress home to recent apps on the Galaxy on5?
Hello and thank you for using XDA Assist,
please create an account and create a thread in this section:
Android Q&A, Help & Troubleshooting
The experts there will be able to help you.
Kind regards
Trafalgar Square
XDA Assist
Hello World,
I have a SG Note, with Lineage 7.1 and a bluetooth keyboard attached to it.
It is *highly* unnerving, when I am in the middle of some other task and the browser pops uo, because I touched the wrong key combination by accident.
Yet even so I found the button in "Settings" where it lists the pre-defined app shortcuts, I can not find the option to change/disable the same.
I'd be grateful for any help here.
Masinissa said:
Hello World,
I have a SG Note, with Lineage 7.1 and a bluetooth keyboard attached to it.
It is *highly* unnerving, when I am in the middle of some other task and the browser pops uo, because I touched the wrong key combination by accident.
Yet even so I found the button in "Settings" where it lists the pre-defined app shortcuts, I can not find the option to change/disable the same.
I'd be grateful for any help here.
Click to expand...
Click to collapse
You've already created a thread on this topic here:
https://forum.xda-developers.com/android/help/how-to-disable-keyboard-shortcuts-t3967752
Do not create duplicate threads please.
Thread closed.