2010-03-12 3 views
2

나는 Blackberry 용 응용 프로그램을 개발합니다. Storm 1 (4.7)과 Storm 2 (5.0)에서는 응용 프로그램에서 가속도계를 비활성화해야합니다. 내 응용 프로그램이 가속도계에 반응하지 않지만 다른 응용 프로그램에는 영향을주지 않기를 바랍니다. 있을 수있다?Blackberry Storm의 가속도계 비활성화

답변

5

는 가속도계를 사용하지 않도록 할 수있는 방법이 없습니다하지만 당신은 화면 방향 변화를 잠글 수 있습니다 :

// 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); 

Specifying the orientation and direction of the screen

를 참조하십시오