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
精彩评论