Log in or register to post comments

unintended screen orientation changes

February 20, 2012 - 7:32pm #1

I'm making AR apps based on the VirtualButtons sample.

For screen orientation, my code is like followings.

screenOrientation = AcitivityInfo.SCREEN_ORIENTATION_PORTRAIT;
setRequestedOrientation(screenOrientation);
setActivityPortraitMode(screenOrientation == AcitivityInfo.SCREEN_ORIENTATION_PORTRAIT);

Also, in AndroidManifest.xml I set the property, android:screenOrientation="portrait"

However, once in a while, texture images are displayed in a landscape mode when I start the AR activity.

Anyone who knows this issue and its solution?

Re: unintended screen orientation changes

March 8, 2012 - 10:58pm #10

Great, thanks for the update!

- Kim

Re: unintended screen orientation changes

March 7, 2012 - 9:08pm #9

Hi Kim.

I did migration to 1.5.9 version successfully following the migration guide.

It seems that the problem doesn't occur anymore. I have tested with a couple of android smartphones where I faced the problem. I'm not 100% sure that the problem is fixed, but at least in my test cases, I didn't see the problem.

Re: unintended screen orientation changes

February 27, 2012 - 6:24pm #8

Yes, there is a bit of work to upgrading, but not too much. There's a migration guide available under the Developer Guide:

https://ar.qualcomm.at/qdevnet/developer_guide

I think there's a chance this solves your problem, but of course it isn't guaranteed. It is true that the 1.0.6 version of the library had some issues with multiple orientations that have since been fixed. If you do upgrade, please let us know if you still see the problem!

- Kim

Re: unintended screen orientation changes

February 26, 2012 - 8:33pm #7
ksiva wrote:

Can you provide a screenshot of what you're seeing?

I might suggest upgrading to the 1.5 release (which just came out today!) It solves some issues with multiple orientations.

- Kim

Thanks. Kim.

The screenshot has been attached. As you can see, I grab the phone in a portrait mode, but the AR objects are rendered as if it is in a landscape mode.
They should be rotated by 90 degrees clockwise.

Does upgrading to the 1.5 release require some work to handle changed APIs?
I've installed the 1.5 release and compiled the program, but compile error occurred. Some APIs seem to be changed.
I'm not sure how long it takes and it fixes the aforementioned problem. So I'm not sure it is the best option.

Re: unintended screen orientation changes

February 22, 2012 - 6:36pm #6

Can you provide a screenshot of what you're seeing?

I might suggest upgrading to the 1.5 release (which just came out today!) It solves some issues with multiple orientations.

- Kim

Re: unintended screen orientation changes

February 22, 2012 - 6:33pm #5

It seems not to solve the problem..

When the app has only one activity, VirtualButtons, I didn't see that problem..
I think that I've been facing the problem after I added other activities, e.g., home screen where users start the VirtualButtons activity. Those activities should work in a portrait mode and are set by android:screenOrientation="portrait"..

Might it affect the working of VirtualButtons?

Re: unintended screen orientation changes

February 22, 2012 - 4:52pm #4

Did removing that line from the manifest help?

- Kim

Re: unintended screen orientation changes

February 21, 2012 - 8:55pm #3
ksiva wrote:

Try removing this. When I've tested portrait in the past I only changed the screenOrientation variable in the main activity file. That should work.

What do you mean by the "texture images" here? Is the splash screen incorrect, or the camera background, or something else?

- Kim

I mean the rendered AR objects by the "texture images".
My app don't use 3d objects like teapot in the samples, but 2d objects..

Those objects are sometimes rendered as if the app works in a landscape mode. but it's in a portrait mode. so I was seeing the objects rotated counterclockwise by 90 degrees.

Re: unintended screen orientation changes

February 21, 2012 - 5:24pm #2
Quote:

Also, in AndroidManifest.xml I set the property, android:screenOrientation="portrait"

Try removing this. When I've tested portrait in the past I only changed the screenOrientation variable in the main activity file. That should work.

What do you mean by the "texture images" here? Is the splash screen incorrect, or the camera background, or something else?

- Kim

Log in or register to post comments