Stage orientation on a nook (android)
I have had some of my apps fail approval for the new nook HD because I do not allow orientation changes in them. It didn't stop them beign approved for the normal nook, but there you go.
On iOS I use this code to only keep orientation to portrait. But this doesn't work on andorid, what other solution is there to fix it so you get no landscape orientation on an android device?
var startOrientation:String = stage.orientation;
if (startOrientation == "default" || startOrientation == "upsideDown")
{
}
else
{
stage.setOrientation(StageOrientation.DEFAULT);
}
stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChangeListener);
function orientationChangeListener(e:StageOrientationEvent)
{
if (e.afterOrientation == "rotatedLeft" || e.afterOrientation == "rotatedRight")
{
e.preventDefault();
}
}
