-
Notifications
You must be signed in to change notification settings - Fork 217
Entitlement Check using GVRF
- Add the GVRf extension to your build.gradle
ext.gearvrfVersion='3.3.0'
dependencies {
compile "org.gearvrf:platformsdk_support:$gearvrfVersion"
}
-
Next add the following lines to your application's
GVRMain.onInit()
method:PlatformEntitlementCheck.start(gvrContext, "application-id", new PlatformEntitlementCheck.ResultListener() { @Override public void onSuccess() { Log.i(TAG, "onSuccess"); } @Override public void onFailure() { Log.i(TAG, "onFailure"); } });
Note: Do not try to run the app here, it would only result in an error:
E/gvrf: ovr_PlatformInitializeAndroid failed with error -1 W/System.err: java.lang.IllegalStateException: Could not initialize the platform sdk; error code: -1 W/System.err: at org.gearvrf.PlatformEntitlementCheck.start(PlatformEntitlementCheck.java:63)
-
Go to the Oculus Dashboard and create a new app. Update the API call above to use the provided app id.
-
Make sure your app matches the Oculus manifest requirements :
https://developer3.oculus.com/documentation/publish/latest/concepts/publish-mobile-manifest/
-
Make sure the app is signed :
https://developer3.oculus.com/documentation/publish/latest/concepts/publish-mobile-app-signing/
-
Compile and upload your build to the dashboard's Store channel, address any issues raised by the build validator.
-
Next, make sure your phone is connected to the Internet and the Developer mode is turned off. Insert the phone into the headset and launch Oculus home. Your app should now show up under library, go ahead and launch the app.
-
Finally, running your app(even in developer mode) should result in an onSuccess() when performing the entitlement check.