Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
zzzuxy's avatar
zzzuxy
Honored Guest
3 years ago

ovr_GetLoggedInUserID always return 0

const char* appID = "the-app-id";
if (ovr_PlatformInitializeAndroid(appID, androidApp->activity->clazz, Env) != ovrPlatformInitialize_Success) {
ALOGE("Failed to initialize Platform sdk.");
exit(1);
}
ALOGV(" my logged in user ID is: %lu ", ovr_GetLoggedInUserID());
const char *sku = "unpublished_item";
ALOGV(" launch checkout flow ");
ovr_IAP_LaunchCheckoutFlow(sku);

I am having trouble setting up the SDK in my OpenXR app. 

The initialization is successful, however I always get ovr_GetLoggedInUserID as 0. And the ovr_IAP_LaunchCheckoutFlow will end up with an error "Received launch checkout failure: An Unknown error occurred"

Is there anything I am missing?

1 Reply

  • Hello zzzuxy 

    I try to figure out how to make this work: ovr_PlatformInitializeAndroid

    It seems you were able to go further than me πŸ™‚

    Here is my code:

    JNIEnv* Env;
    (*androidApp->activity->vm).AttachCurrentThread(&Env, nullptr);
    manager_config::current_path(androidApp->activity->internalDataPath);

    auto
    resultat = ovr_PlatformInitializeAndroid( "XXX APP ID XXX", androidApp->activity->clazz, Env);

    But it makes my app go into an infinite loop with this error (miising com.oculus.platformsdkruntime)
    Did you ever encounter this error?

    Thanks.


    W/System.err: android.content.pm.PackageManager$NameNotFoundException: com.oculus.platformsdkruntime
    W/System.err: at android.app.ApplicationPackageManager.getPackageInfoAsUser(ApplicationPackageManager.java:190)
    W/System.err: at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:159)
    D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.base-V1.0-java.jar
    D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.manager-V1.0-java.jar
    D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.base-V1.0-java.jar
    I/.neopunk.arcad: The ClassLoaderContext is a special shared library.
    I/GuardianSurfaceMgr: [GuardianSurfaceMgr::GetSurfaceMapData] surface 0 does not exist in map.
    I/OVRPlatform: [LoaderUtils] PlatformSDK check API compatibility (requested api = 1.1.86.0, implementation = 1.1.82.0)
    W/System.err: java.lang.RuntimeException: Requested PlatformSDK version (api=1.1.86.0, driver=0) is incompatible with the currently installed version.
    W/System.err: at X.001.A01(:2)
    W/System.err: at com.oculus.platform.loader.EntryPoint.load(:100)
    W/System.err: at com.oculus.platform.loader.EntryPoint.loadGeneric(:0)
    W/System.err: at com.oculus.platform.loader.EntryPoint.load64(:0)
    E/OVRPlatform-Loader: platformSDK_Initialize: Failed to load PlatformSDK driver (-1)!