cancel
Showing results for 
Search instead for 
Did you mean: 

Unity: How to build APK without getting "To open this application, insert your Gear VR" message

chadyo
Explorer
I'm building a scene in unity that's going to be a 2 player game where one player is on mobile (not in VR) and another person is on the rift. I want to build the APK, so I disable "Virtual Reality Supported" in Player Settings -> XR Settings and I disable the OVRPlayerController. However, when I run the APK on my Note 4, I get the message "To open this application, insert your Gear VR".

I found ways to disable this by entering developer mode but this is build is not supposed to be VR enabled once it's shipped out so it needs to be non VR on mobile. How can I create a PC build for VR of a scene but have the mobile APK build be non VR?
1 REPLY 1

chadyo
Explorer
Figured it out. You have to change your AndroidManifest.xml com.samsung.android.vr.application.mode value from "vr_only" to "dual", but modifying this file isn't very straightforward. To do that properly, you can do the following:

1. Build your APK and get your AndroidManfest.xml content (you can view this in Android Studio or just unzip the apk
2. Copy that file to your Assets/Plugins/Android directory (create it if it doesn't exist)
3. Modify the xml file to add the attribute  xmlns:tools="http://schemas.android.com/tools" to your <manifest> tag
4. Replace the meta-data vr_only entire line with:
<meta-data
        tools:replace="android:value"
        android:name="com.samsung.android.vr.application.mode"
        android:value="dual" />
5. Rebuild your APK