Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

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

NoxyNoxy Posts: 9
NerveGear
edited May 2016 in Oculus Go Development
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?

Comments

  • delphinius81delphinius81 Posts: 297
    Nexus 6
    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.
  • delphinius81delphinius81 Posts: 297
    Nexus 6
    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.
  • NoxyNoxy Posts: 9
    NerveGear
    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!
  • ashuppashupp Posts: 18 Oculus Staff
    FYI, if you update to a more recent version of the Unity SDK the callbacks will be dispatched for you automatically.
  • chesstarchesstar Posts: 12 Oculus Start Member
    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?
  • delphinius81delphinius81 Posts: 297
    Nexus 6
    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.
  • chesstarchesstar Posts: 12 Oculus Start Member
    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.
  • PiccolossePiccolosse Posts: 1
    NerveGear
    edited May 17
    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
Sign In or Register to comment.