How do you define custom behaviours for the Android phone's volume buttons using Adobe AIR (ActionScript 3)?

╄→尐↘猪︶ㄣ 提交于 2019-12-31 04:12:12

问题


For buttons like the MENU or BACK button you can just add a listener for KeyboardEvent and check if the event keyCode is Keyboard.BACK or Keyboard.MENU.

However I don't see anything for knowing if the phone's volume buttons were pressed.

Is there a way to listen for volume up and volume down keyUp/keyDown events in AIR (ActionScript 3)?


回答1:


Nope. There isn't any support for detecting the volume buttons. (In AIR 3, you can write a native extension to access native features that aren't otherwise supported.)



来源:https://stackoverflow.com/questions/7125289/how-do-you-define-custom-behaviours-for-the-android-phones-volume-buttons-using

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