开发者

Disable accelerometer on Blackberry Storm

开发者 https://www.devze.com 2022-12-22 22:24 出处:网络
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, bu

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

精彩评论

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