Override menu key long press and launch an application on long press

时光怂恿深爱的人放手 提交于 2019-12-25 04:59:13

问题


I want to do something like this-

1.Override the default action of the menu key long press (i.e. launching soft keyboard).

2.Whenever user long presses the menu key, my application will be launched.

3.Moreover, my application may not need to be in the foreground, i.e. even if someone long presses menu key from any other application my application should be launched.

Is this at all possible? How?


回答1:


Is this at all possible? How?

By making your own firmware, where you add this capability to the operating system, and by deploying your custom firmware on your own personal phone (and the phones of anyone else you can convince to run it).

This is not possible for a regular Android SDK application.




回答2:


Yes you can, just root your device (with Cyanogenmod for example) and go to Settings, Cyanogenmod settings, and Input settings. You will find the option there. Instructions for rooting the G2x can be found here: http://forum.xda-developers.com/showthread.php?t=1039985



来源:https://stackoverflow.com/questions/10530517/override-menu-key-long-press-and-launch-an-application-on-long-press

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!