cancel
Showing results for 
Search instead for 
Did you mean: 

APK Rejected due to not being in Landscape mode

Onionman77
Level 4
Hello, I am hoping that someone can help me with this.

I have tried multiple times to upload my binary to the GearVR store and each time lately it has been rejected for not being in landscape mode. I'm not quite sure what to do as I've explicitly set landscape in the Android manifest and also made sure it's checked in the Unity settings (also VR supported is checked). Does anyone else have any ideas?

-Brandon
13 REPLIES 13

Onionman77
Level 4
Well, I had changed the Android Manifest manually per the guidelines (that yes I knew about), and I've been able to upload my binaries to the Oculus store before.

I'm using the most current version of Unity. I had also manually put in screenOrientation:landscape into the manifest file, no luck. I'm at a loss!

Onionman77
Level 4
ap6wxp0w819q.png

zotelu11odn2.png


I don't know what to do 😞 This seems like such a stupid check as landscape is obviously the only thing a GearVR app can be in.

I'm a little bit peeved by this. I guess I'll just move on to Daydream. It's just stupid to not get on some store because of a silly reason like this.

Onionman77
Level 4
Thanks Imperativity. Ya I've tried creating my own manifest from scratch (well modifying manually the auto generated one Unity makes) and using the Oculus created manifest. I feel like somewhere Unity is throwing in some portrait thing at the last stage, and I need to figure out where that is (even though it doesn't actually effect the GearVR version). I'll take a look at it again when I come back to this.

What confuses me is the store used to accept my APK, and now it doesn't. So I need to find what changed I suppose.

kees_veerman
Level 2
@imperativity @Onionman77; I'm running into this exact issue myself, have you found a solution in the meantime?

kees_veerman
Level 2
Hi @imperativity, 

I checked all the acceptance requirements for the GO, weeded out the last errors that blocked the upload to the oculus store, but I keep getting 1 message stating that android:screenOrientation should be landscape, which is stated in the activity tag. 

APK Can't Be Validated

We found issues with the APK during validation. Please check that the APK meets the `Application Manifest Requirements` and then resubmit your app.

  • Schermoriëntatie APK is niet liggend (android:screenOrientation in AndroidManifest.xml).

I have looked at this with a number of my fellow VR developers and with a senior Android developer, but we couldn't crack the nut...

Could you have a look at the manifest where the issue resides? Hope you can help me out and would be much appreciated as I'm at an absolute standstill:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.Company.PublicSpeaking" xmlns:tools="http://schemas.android.com/tools" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
  <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:isGame="true" android:banner="@drawable/app_banner" android:theme="@style/VrActivityTheme">
    <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
      <activity  android:resizeableActivity="false" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:excludeFromRecents="true" android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="density|keyboard|keyboardHidden|navigation|orientation|screenLayout|screenSize|uiMode">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.INFO" />
      </intent-filter>
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    </activity>
    <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" />
    <meta-data android:name="unity.build-id" android:value="e6d64042-a71b-47d9-856f-979d6f31a6f1" />
    <meta-data android:name="unity.splash-mode" android:value="0" />
    <meta-data android:name="unity.splash-enable" android:value="False" />
    <meta-data android:name="android.max_aspect" android:value="2.1" />
  </application>
  <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="24" />
  <uses-feature android:glEsVersion="0x00030001" />
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
  <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
  <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>

Have a great weekend and thanks in advance!


Regards Kees

kees_veerman
Level 2
@imperativity I think I found the issue; when building the APK in Unity, Unity itself seems to be changing lines in the code, making it (and in this case also the Orientation) non compatible with the Oculus platform requirements. 
In the actual result below, you can see the screen Orientation is changed to "10" in stead of "landscape":
android:screenOrientation="10"

What happens to the xml exmple you sent in the Unity Build:
<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="1"
    android:versionName="1.0"
    android:installLocation="0"
    package="com.Company.PublicSpeaking"
    platformBuildVersionCode="24"
    platformBuildVersionName="7.0">
    <uses-sdk
        android:minSdkVersion="21"
        android:targetSdkVersion="24" />
    <uses-feature
        android:glEsVersion="0x30001" />
    <uses-permission
        android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission
        android:name="android.permission.INTERNET" />
    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.touchscreen.multitouch"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.touchscreen.multitouch.distinct"
        android:required="false" />
    <uses-permission
        android:name="android.permission.WAKE_LOCK" />
    <uses-permission
        android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission
        android:name="android.permission.READ_PHONE_STATE" />
    <application
        android:theme="@ref/0x7f050005"
        android:label="@ref/0x7f040016"
        android:allowBackup="true"
        android:supportsRtl="true"
        android:banner="@ref/0x7f020000"
        android:isGame="true">
        <activity
            android:theme="@ref/0x0103000a"
            android:name="com.unity3d.player.UnityPlayerActivity"
            android:excludeFromRecents="true"
            android:launchMode="2"
            android:screenOrientation="10"
            android:configChanges="0x40003fff">
            <intent-filter>
                <action
                    android:name="android.intent.action.MAIN" />
                <category
                    android:name="android.intent.category.INFO" />
            </intent-filter>
        </activity>
        <meta-data
            android:name="unityplayer.SkipPermissionsDialog"
            android:value="false" />
        <meta-data
            android:name="unity.build-id"
            android:value="63700f14-34f2-411f-9f6e-4c6a4b55ce11" />
        <meta-data
            android:name="unity.splash-mode"
            android:value="0" />
        <meta-data
            android:name="unity.splash-enable"
            android:value="false" />
        <meta-data
            android:name="android.max_aspect"
            android:value="1074161280.000000" />
        <activity
            android:label="@ref/0x7f040016"
            android:name="com.google.gvr.keyboardsupport.TransitionVRActivity"
            android:exported="false"
            android:configChanges="0x16e0"
            android:resizeableActivity="false"
            android:enableVrMode="com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService">
            <intent-filter>
                <category
                    android:name="android.intent.category.LAUNCHER" />
                <category
                    android:name="com.google.intent.category.DAYDREAM" />
            </intent-filter>
        </activity>
        <activity
            android:label="@ref/0x7f040016"
            android:name="com.google.gvr.permissionsupport.TransitionVRActivity"
            android:exported="false"
            android:configChanges="0x16e0"
            android:enableVrMode="com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService">
            <intent-filter>
                <category
                    android:name="android.intent.category.LAUNCHER" />
                <category
                    android:name="com.google.intent.category.DAYDREAM" />
            </intent-filter>
        </activity>
        <meta-data
            android:name="com.samsung.android.vr.application.mode"
            android:value="vr_only" />
    </application>
</manifest>

Please advise.

kees_veerman
Level 2
Hi @imperativity, 

Thanks for the feedbackm it's really helping the process along.
I've taken Daydream out of the player settings in Unity, did a new build but Daydream still shows up in the manifest...I am investigating how to fully take it out.

Will come back to you, if you have a suggestion, would love to hear it as well.
Have a great day!


Regards Kees

kees_veerman
Level 2


@Onionman77

Don't give up because of this error, are you generating the manifest with the option in Unity for store compliance? There should be no reason for your application to fail this check if you did so.


Running throught the thread I saw this comment you gave earlier, where can I find the Unity for story compliance option? Will try this as well.

PAalto
Level 5






Running throught the thread I saw this comment you gave earlier, where can I find the Unity for story compliance option? Will try this as well.


Tools -> Oculus -> Create store-compatible AndroidManifest.xml

Working on LineWars VR: http://linewars.patrickaalto.com/LWVR.html