cancel
Showing results for 
Search instead for 
Did you mean: 

Oculus.Platform.Entitlements. IsUserEntitledToApplication() never return...

Noxy
Honored Guest
I'm trying to integrate Platform SDK into our Gear VR app. Oculus.Platform.Core.Initialize([app_id]) was completed ok but other APIs ain't working. I tried both IsUSerEntitledToApplciation & GetLoggedInUser, nothing happened. (Callbacks never called, no exception thrown)

BTW, our app is approved, but for key only, not sure if that's the reason.

Any thought/suggestion?
8 REPLIES 8

delphinius81
Rising Star
Did you add the OnComplete(...) handler to your IsUserEntitledToApplication() call?
That is: Oculus.Platform.Entitlements.IsUserEntitledToApplication().OnComplete(IsUserEntitledToApplicationCallback);

Even with no internet access, this callback should run and at least return false.

delphinius81
Rising Star
Ah remembered something else! You have to make sure you call Request.RunCallbacks(); in your update function. That's why you never see the callbacks being executed.

Noxy
Honored Guest


Ah remembered something else! You have to make sure you call Request.RunCallbacks(); in your update function. That's why you never see the callbacks being executed.


That was it! Thanks!

ashupp
Protege
FYI, if you update to a more recent version of the Unity SDK the callbacks will be dispatched for you automatically.

chesstar
Explorer
I used the Request.RunCallbacks.However it cause a lot of GC an one moment.This will block my main thread.Would you have some suggestions?

delphinius81
Rising Star
Does the large GC still hit if you comment out your specific callback functionality? Just trying to determine if it's an oculus issue or your callbacks.

chesstar
Explorer
I tested this,when I comment out my specific callback functionality,the large GC still existed.Actually,this situation will happen after the oculus server return me the successful result,about 0.5MB GC.When the request errored,it will return me 340B GC.So,I think this is an oculus issue.

Piccolosse
Honored Guest
I've got the same issue when I try to intialize Platform in Standalone mode. Without internet connection I don't receive any callback from Entitlements.IsUserEntitledToApplication().OnComplete(IsUserEntitledToApplicationCallback) or any similar function.
I may not initialize the standalone mode correctly, the function 
Platform.InitializeStandaloneOculus doesn't exist in this version of OculusUtlities so i've tried CAPI.ovr_Platform_InitializeStandaloneOculus(OculusInitParams params) or a simple Core.Initialize() but nothing successful happened.

I didn't manage to find non-obsolete informations on how to initialize Platform in standalone mode or on how to get these callbacks when I'm working on a local server.

I'm also running Request.RunCallbacks() in my Update function even if its not necessary to receive callbacks with internet connection.

Any suggestions?

Versions used:
Unity: 2019.1.2f1
Oculus Utlities: 1.36