开发者

Is it possible to map a button and/or a system event to launch an android application?

Good evening I am considering creating an application on the android platform an开发者_C百科d I want to know if it is possible to launch an application based on a particular system event, like pressing and holding a specific button for a period of time (i.e. 3 secs and launch application)?


You can map search + a key to open a particular application. See keyboard shortcuts to switch between applications. That is an OS level thing though, I'm not sure what it would have to do with developing your own application.


Inside an activity it's easy, use the Event Handlers combined with the KeyEvent class and launch your preferred activity with an intent.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜