Highlighted

No orientationEvent on Dell Latitude 10 tablet

Community Beginner ,
Apr 03, 2014

Copy link to clipboard

Copied

I am writing an Air app for the Dell Latitude 10 tablet, running Windows 8 in the desktop mode. I am not receiving orientationChanged events when the device is rotated, even though the orientation does in fact change on the screen.

In fact, Stage.supportsOrientationChange is returning false.

Also autoOrients is showing as false.

Even setting setting stage.autoOrients = true; in the ActionScript code has no effect, it still stays as false.

However, the screen content does change orientation with tablet rotation.

My particular problem is with the use of the camera. When the tablet is rotated, obviously the camera is also rotated and my video stream being sent from it is on its side.

However, other apps, such as Skype, seem to know about the rotation and correctly rotate the video stream.

How can I detect it from ActionScript?

TOPICS
Development

Views

371

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

No orientationEvent on Dell Latitude 10 tablet

Community Beginner ,
Apr 03, 2014

Copy link to clipboard

Copied

I am writing an Air app for the Dell Latitude 10 tablet, running Windows 8 in the desktop mode. I am not receiving orientationChanged events when the device is rotated, even though the orientation does in fact change on the screen.

In fact, Stage.supportsOrientationChange is returning false.

Also autoOrients is showing as false.

Even setting setting stage.autoOrients = true; in the ActionScript code has no effect, it still stays as false.

However, the screen content does change orientation with tablet rotation.

My particular problem is with the use of the camera. When the tablet is rotated, obviously the camera is also rotated and my video stream being sent from it is on its side.

However, other apps, such as Skype, seem to know about the rotation and correctly rotate the video stream.

How can I detect it from ActionScript?

TOPICS
Development

Views

372

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 03, 2014 0
Adobe Community Professional ,
Apr 03, 2014

Copy link to clipboard

Copied

I am taking something of a guess here, but as far as I knew orientation changes were to do with AIR for Mobile, and AIR for Mobile doesn’t support Windows 8. Which means that you would have to rely on AIR for Desktop or Flash Player events to be able to react.

Can you achieve what you want by using the resize event? You will know from that whether it’s now portrait or landscape.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 03, 2014 0
Community Beginner ,
Apr 03, 2014

Copy link to clipboard

Copied

Thanks.

Yes, that is my fallback, but the app runs in a resizable window so the user could resize it to be portrait aspect ratio even when the tablet is held in landscape. So it would not be completely reliable.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 03, 2014 0
Adobe Community Professional ,
Apr 03, 2014

Copy link to clipboard

Copied

Aha! So, you’re saying you’re a masochist!

Is it a web page then? If it is, can you set html to control whether a window resize can force it to be portrait while in landscape?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 03, 2014 0
Community Beginner ,
Apr 03, 2014

Copy link to clipboard

Copied

No not a web page. An Air app that streams video to an remote server, amongst other things.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 03, 2014 0
Community Beginner ,
Apr 03, 2014

Copy link to clipboard

Copied

My app is also designed to run on a normal desktop computer (i.e. not mobile device). If I could detect when it is on a mobile device, I could disable the resizing ability and then use aspect ratio to decide on orientation (although that won't differentiate left and right. But I can't even detect whether i am on a mobile device or not, it seems, becaue Stage.supportsOrientationChange is coming out as false no matter where I run it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 03, 2014 0
Adobe Community Professional ,
Apr 03, 2014

Copy link to clipboard

Copied

Can you set full screen on desktop AIR apps?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 03, 2014 0
Community Beginner ,
Apr 03, 2014

Copy link to clipboard

Copied

Yes you can set fullscreen mode, but I want the user to be able to resize the window, at least when running on normal PC. It is probably acceptable to run fullscreen on a mobile device, if i could detect that i am on such a device. I can detect that Capabilities.TouchscreenType is 'finger' on the tablet and 'none' on a PC with mouse/keyboard, so I could perhaps go with that. It won't cover the case of someone connecting a touchscreen to a PC, though.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 03, 2014 0
Adobe Community Professional ,
Apr 03, 2014

Copy link to clipboard

Copied

Another possibility is whether there is Touch. I know there are notebooks that do touch, but that might cover most normal users.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 03, 2014 0
cgunnaus LATEST
Community Beginner ,
Apr 03, 2014

Copy link to clipboard

Copied

Another idea: Seeing as Skype seems to be able to do the right thing, there must be a way to detect it - just not from within ActionScript. So perhaps there is some NativeProcess call I could make to find the orientation information whenever I detect a resize event. Seem like overkill though.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 03, 2014 0