2010-03-12 5 views
2

Je développe une application pour Blackberry. Dans les tempêtes 1 (4.7) et 2 (5.0), je dois désactiver l'accéléromètre dans mon application. Je veux que mon application ne réagisse pas à l'accéléromètre, mais cela n'affecte pas les autres applications. C'est possible?Désactiver l'accéléromètre sur Blackberry Storm

Répondre

5

Il n'y a aucun moyen de désactiver l'accéléromètre, mais vous pouvez verrouiller l'écran changement d'orientation:

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

Voir Specifying the orientation and direction of the screen

Questions connexes