开发者

Disable accelerometer on Blackberry Storm

i develop application for Blackberry. In Storm 1 (4.7) and Storm 2 (开发者_如何学Go5.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?


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜