在 Blackberry Storm 上禁用加速计

发布于 2024-08-25 01:58:24 字数 107 浏览 6 评论 0原文

我为黑莓开发应用程序。在 Storm 1 (4.7) 和 Storm 2 (5.0) 中,我需要在应用程序中禁用加速度计。我希望我的应用程序不会对加速度计做出反应,但这不会影响其他应用程序。有可能吗?

i develop application for Blackberry. In Storm 1 (4.7) and Storm 2 (5.0) i need to disable accelerometer in my application. I want my application does not react to the accelerometer, but that does not affect other applications. Its possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

魂牵梦绕锁你心扉 2024-09-01 01:58:24

无法禁用加速计,但您可以锁定屏幕方向更改:

// To force portrait view in a BlackBerry API application,
// use code like this before invoking UiApplication.pushScreen()
int directions = Display.DIRECTION_NORTH | Display.DIRECTION_SOUTH;
Ui.getUiEngineInstance.setAcceptableDirections(directions);

请参阅 指定屏幕的方向和方向

There is no way to disable accelerometer but you can lock screen orientation change:

// To force portrait view in a BlackBerry API application,
// use code like this before invoking UiApplication.pushScreen()
int directions = Display.DIRECTION_NORTH | Display.DIRECTION_SOUTH;
Ui.getUiEngineInstance.setAcceptableDirections(directions);

See Specifying the orientation and direction of the screen

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文