BlackBerry 编程 - 侧面硬件音量按钮
有没有办法知道用户是否按下手机侧面的两个硬件音量按钮之一?
Is there a way to know if users press one of the two hardware volume buttons on the side of the phone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 MainScreen 或 FullScreen 类上,重写以下方法:
需要注意的是,这仅在您的应用程序和屏幕位于前台时才有效。如果您希望允许用户在应用程序处于后台时使用音量键,则需要使用 BlackBerry Media Actions API,仅适用于 5.0 及更高版本。
On your MainScreen or FullScreen class, override the following method:
The caveat being that this only works when your app and that screen are in the foreground. If you want to allow users to use the volume keys while your app is in the background, you'll need to use the BlackBerry Media Actions API, which is only available on 5.0 and above.