Log in or register to post comments

QCAR::setInitParameters QCAR::ROTATE_IOS_90

May 24, 2016 - 2:54am #1

Hello,

I've been trying to find the ROTATE_IOS_90 flag for Android but the documentation doesn't specify anything like that.

How can I force rotating the background texture by 90degrees on Android?
And why this flag is only available on iOS?

Thanks!

QCAR::setInitParameters QCAR::ROTATE_IOS_90

May 31, 2016 - 5:11pm #2

Hello,

For Android, Vuforia passes the AndroidActivity as a parameter into the Vuforia::setInitParameters method. The SDK then stores a reference to the Activity and uses it internally for tasks related to rendering and camera handling. These values are set in the AndroidManifest.xml file for your project.

<activity
            android:name="com.vuforia.samples.ImageTargets.ImageTargets"
            android:screenOrientation="portrait"
            android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize" />

You can also derive the current orientation automatically through the Activity.

https://developer.android.com/reference/android/app/Activity.html#getRequestedOrientation%28%29

https://developer.android.com/reference/android/app/Activity.html#setRequestedOrientation%28int%29

Thanks

Log in or register to post comments