Jump to content

Wave Android Manifest Guide


Corvus

Recommended Posts

Android requires every app to use a manifest file to define the app requirements and other useful information. The Wave SDK uses the Android manifest to define HMD degrees of freedom (3DoF/6DoF), controller DoF (3DoF/6DoF), number of controllers supported (0,1,2), and the minimum Wave SDK required.

https://developer.android.com/guide/topics/manifest/manifest-intro

 

WaveVR Attributes

Please ensure that these metadata in your manifest matches the capabilities of your title. This metadata will affect how VIVEPORT store distributes and displays your title.
(NOTE: Required for store submissions and betas but not necessary for testing)

https://hub.vive.com/storage/app/doc/en-us/ConfigureAppCapabilities.html

https://developer.viveport.com/documents/sdk-wave/en/VRActivity.html

 

Viveport DRM Android Manifest Documentation:
https://developer.vive.com/resources/viveport/viveport-documentation/english/viveport-sdk/apis/drm-api/vive-wave-permissions/

NOTE: If using the Viveport SDK DRM you will also need to add the following line to the manifest:

<uses-permission android:name="com.viveport.CHECK_LICENSE" />

 

Unity

https://docs.unity3d.com/Manual/android-manifest.html

- Download example manifest (attached below)
- Copy example manifest into 'Customize' folder
Assets\WaveVR\Platform\Android\Customize
- Rename 'AndroidManifest_EXAMPLE.xml' to 'AndroidManifest.xml'
- Edit the manifest, set values for NumDoFHmd, NumDoFController, NumController, and minWaveSDKVersion

 

 

Unreal (UE4)

https://docs.unrealengine.com/en-US/Platforms/Mobile/Android/AndroidManifestControl/index.html

https://docs.unrealengine.com/en-US/Platforms/Mobile/Android/AndroidManifestControl/index.html#extrasettingsforapplication

- Advanced APK Packaging
- Extra Settings for <application> section (\n to separate lines)

        <meta-data android:name="com.htc.vr.content.NumDoFHmd" android:value="6DoF"/>
        \n
        <meta-data android:name="com.htc.vr.content.NumDoFController" android:value="6DoF"/>
        \n
        <meta-data android:name="com.htc.vr.content.NumController" android:value="2"/>
        \n
        <meta-data android:name="minWaveSDKVersion" android:value="1" />


Example to copy:
<meta-data android:name="com.htc.vr.content.NumDoFHmd" android:value="6DoF"/> \n <meta-data android:name="com.htc.vr.content.NumDoFController" android:value="6DoF"/> \n <meta-data android:name="com.htc.vr.content.NumController" android:value="2"/> \n <meta-data android:name="minWaveSDKVersion" android:value="1" />

1950719387_ue4wavemanifest.png.4fc69010e7c2f160d2ca7e2524904e61.png

 

Skip Controller Pairing (Vive Focus & Focus Plus only):

To skip the controller pairing dialog when you're app starts you can use add the following line to the manifest <application> section.

        <!-- Disable Controller Pairing (set to 'true' to skip controller pairing dialog) -->
        <meta-data android:name="no_controller_pairing" android:value="true" />

 

AndroidManifest_EXAMPLE.xml

AndroidManifest_EXAMPLE_3DoF_Controller.xml

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

  • 3 years later...
  • 5 months later...

As this thread has been some time, just want to add some notes here regarding the Unity AndroidManifest manipulation.

In latest SDK, modifying the \Assets\Plugins\Android\AndroidManifest.xml is easier. And it is used in prior to the Assets\WaveVR\Platform\Android\Customize when packaging the apk file.

In addition, to add the VR prompt for the user to grant the permission, here's a code snippet to request permissions for read & write local storage permissions:

...
using Wave.Essence;
...
public class PermissionReq : MonoBehaviour
{

    private static PermissionManager pmInstance = null;
    public static bool readPermissionGranted { get; private set; } = false;
    public static bool writePermissionGranted { get; private set; } = false;

    private const string readPermissionString = "android.permission.READ_EXTERNAL_STORAGE";
    private const string writePermissionString = "android.permission.WRITE_EXTERNAL_STORAGE";

    // Start is called before the first frame update
    void Start()
    {
        RequestPermissions();
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public static void RequestPermissions()
    {
        string[] permArray =
        {
            readPermissionString,
            writePermissionString
        };

        pmInstance = PermissionManager.instance;
        pmInstance?.requestPermissions(permArray, requestDoneCallback);
    }

    private static void requestDoneCallback(List<PermissionManager.RequestResult> results)
    {
        foreach(PermissionManager.RequestResult result in results)
        {
            if (result.PermissionName.Equals(readPermissionString)){
                readPermissionGranted = result.Granted;
            }
            if (result.PermissionName.Equals(writePermissionString)){
                writePermissionGranted = result.Granted;
            }
        }
    }
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...