Disable accelerometer on Blackberry Storm
-
19-09-2019 - |
Question
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?
Solution
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);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow