Reputation: 11
1.Our project is a hybrid app which contains 2D traditional activities and Cardboad VR mode, and now we want to introduce Daydream API to publish the app on Daydream platform, but it seems that app published on Daydream will also be published on Google Play VR, which means that 2D traditional activities should never been shown to users who have put on Daydream View. Is it right?
If so, how to know whether the user actives the app from Google Play VR,or just from Daydream platform?
Actually, Our app is of vertical screen except for the VR mode,which means, if users active it from Google Play VR platform, the first shown is 2D traditional activity,and this seems to not meet requirements of Daydream App Quality,but if users tap the 2D icon to open the app,it will be ok,because users have not yet put on Daydream View,and can choose VR mode by their finger.
Another question is can we publish the app to Daydream and Google Play VR platform in this state,a vertical screen app with a Daydream VR mode button?If it is ok,how to work out the problem when user active the app from Google Play VR?
Upvotes: 1
Views: 215
Reputation: 10058
This documentation by Google has everything you need: https://developers.google.com/vr/develop/unity/guides/hybrid-apps
It gives you the steps needed to enable it to start in 2D mode and then switch to VR and vice-versa.
Upvotes: 0
Reputation: 86
You can set up your app so that when launched from VR Home the user will be sent directly into a VR activity, and when launched from the 2D launcher the user will be sent to a 2D activity.
This is done in your app manifest. The VR entry screen's activity intent filter should have the MAIN action and CARDBOARD and DAYDREAM categories set. The 2D entry screen's activity intent filter should have the MAIN action and the LAUNCHER category set.
<manifest>
...
<application>
...
<activity
android:name=".VRActivity"
android:enableVrMode="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.google.intent.category.CARDBOARD" />
<category android:name="com.google.intent.category.DAYDREAM" />
</intent-filter>
</activity>
<activity
android:name=".RegularNonVRActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Upvotes: 1