I want to add开发者_运维百科 the functinality of Home,Back,Searcha and Menu Hard keys via some soft keys which can be accessed anytime the device is up.
I know their are few applications available which already do this, but i wanted to know the way this can be implemented.
Any help would be appreciated.
As stated elsewhere, the SDK is not enough to emulate hardware buttons: you need to be able to modify or at least call system sources, so you should be compiling Android from sources. That said you can emulate the software button by calling "injectKeyEvent" in IWindowManager like done in these examples:
- http://java-admin.iteye.com/blog/813208 (chinese)
- http://tinyurl.com/5spjxja (android-x86 patch)
精彩评论