virtual-realitygoogle-cardboardgoogle-vrdaydreamgoogle-vr-sdk

Google VR : Switch daydream / cardboard mode


im currently trying to run an app with daydream compatibility. Everything works fine except when im trying to switch to the cardboard mode, and i get the following error message "This Cardboard application is not compatible with the Daydream headsets"

According to some post ive found online, it could be a manifest issue ( https://github.com/Samsung/GearVRf/issues/1618 and https://github.com/googlevr/gvr-android-sdk/issues/295 ) but my app properly declare the DAYDREAM intent filters, here's my manifest ( my problem occurs while in the PlayerActivity )

<?xml version="1.0" encoding="utf-8"?>

<!-- Required GLES 2 -->
<uses-feature android:glEsVersion="0x00020002" android:required="true" />

<!-- Required by the app to stream video. -->
<uses-permission android:name="android.permission.INTERNET" />

<!-- Make accelerometer and gyroscope hard requirements for good head tracking. -->
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"/>

<!-- Indicates use of Android's VR-mode, available only on Android N+. -->
<uses-feature android:name="android.software.vr.mode" android:required="true"/>
<!-- Indicates use of VR features that are available only on Daydream-ready devices. -->
<uses-feature android:name="android.hardware.vr.high_performance" android:required="true"/>

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_sphereplay"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:largeHeap="true">

    <activity
        android:name=".MainActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:theme="@style/SpherePlayMaterialTheme"
        android:label="@string/app_name" >
        <!-- Cardboard -->
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name=".PlayerActivity"
        android:screenOrientation="landscape"
        android:theme="@style/SpherePlayMaterialTheme"
        android:resizeableActivity="false"
        android:configChanges="density|keyboardHidden|navigation|orientation|screenSize|uiMode"
        android:launchMode="singleTask">

        <intent-filter>
            <category android:name="com.google.intent.category.CARDBOARD" />
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="spmedia"/>
        </intent-filter>
    </activity>

    <activity
        android:name=".DaydreamActivity"
        android:screenOrientation="landscape"
        android:theme="@style/SpherePlayMaterialTheme"
        android:resizeableActivity="false"
        android:configChanges="density|keyboardHidden|navigation|orientation|screenSize|uiMode"
        android:enableVrMode="@string/gvr_vr_mode_component"
        android:launchMode="singleTask">

        <!-- The VR icon to be used in Daydream Home comes in two parts:
            a foreground icon and a background icon.  -->
        <meta-data
            android:name="com.google.android.vr.icon"
            android:resource="@drawable/vr_icon_fg" />
        <meta-data
            android:name="com.google.android.vr.icon_background"
            android:resource="@drawable/vr_icon_bg" />

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="com.google.intent.category.DAYDREAM" />
        </intent-filter>
    </activity>

</application>

Any idea what to do in order to be able to use the cardboard mode?


Solution

  • I am not a programmer, but I think I may know of a workaround. I have a zte blade max model number z982 from MetroPCS Awesome phone by the way. First thing I did was install CardBoard on it, was disappointed that it didn't want to use my bluetooth gamepad. So I tryed to get the DayDream app, but google wouldn't let me download it to my cheap phone so I don't know if it could use my bluetooth gamepad or not. but I did see that I could download Google VR Services app, I hoped that would let me use my bluetooth gamepad in cardboard, no luck. But I did find out that I could setup google cardboard to use ether it self or Google VR Services in the settings.

    For your problem I think you need to go into cardboard, then demo games. When the screen comes up tap on the * button in the middle, bottom of the screen, that takes you to the settings screen you should see a popup that asks you which service you want to use. select cardboard and one time. I believe this workaround will work for you.