API reference

Core Class

The Core class provides methods for initializing and checking the status of the Oculus Platform SDK. This class is responsible for setting up the necessary components and configurations to enable communication with the Oculus Platform, allowing developers to access features such as Entitlement checks: Entitlement.getIsViewerEntitled(). The Core class also provides methods for checking the initialization status of the platform, allowing developers to determine whether the platform is ready for use.

Public Statics

static String PlatformUninitializedError[Get]

Static Member Functions

Returns true if the Platform has been initialized. If asyncInitialize(Context) is called, this will return true before the async initialization is complete.
Returns
true if the Platform has been initialized.
Synchronously initialize Platform SDK.This overload will attempt to read the Oculus App Id from the AndroidManifest.While the platform is in an initializing state, it's not fully functional. Requests will queue up and run once platform is initialized. For example: com.meta.horizon.platform.ovr.requests.UserAgeCategory#get() can be called immediately after asynchronous init and once platform is initialized, this request will run Synchronous functions will return the default value;
Parameters
context
The Android Context to bind to the Platform.
Returns
true if the platform was successfully initialized, false otherwise.
Synchronously initialize Platform SDK.This overload will attempt to read the Oculus App Id from the AndroidManifest.While the platform is in an initializing state, it's not fully functional. Requests will queue up and run once platform is initialized. For example: com.meta.horizon.platform.ovr.requests.UserAgeCategory#get() can be called immediately after asynchronous init and once platform is initialized, this request will run Synchronous functions will return the default value;
Parameters
context
The Android Context to bind to the Platform.
options
The options used to configure the Platform.
Returns
true if the platform was successfully initialized, false otherwise.
Synchronously initialize Platform SDK.While the platform is in an initializing state, it's not fully functional. Requests will queue up and run once platform is initialized. For example: com.meta.horizon.platform.ovr.requests.UserAgeCategory#get() can be called immediately after asynchronous init and once platform is initialized, this request will run Synchronous functions will return the default value;
Parameters
appID
The Oculus App Id to use for the Platform.
context
The Android Context to bind to the Platform.
Returns
true if the platform was successfully initialized, false otherwise.
Synchronously initialize Platform SDK.While the platform is in an initializing state, it's not fully functional. Requests will queue up and run once platform is initialized. For example: com.meta.horizon.platform.ovr.requests.UserAgeCategory#get() can be called immediately after asynchronous init and once platform is initialized, this request will run Synchronous functions will return the default value;
Parameters
appID
The Oculus App Id to use for the Platform.
context
The Android Context to bind to the Platform.
options
The options used to configure the Platform.
Returns
true if the platform was successfully initialized, false otherwise.
Asynchronously initialize Platform SDK.This overload will attempt to read the Oculus App Id from the AndroidManifest.While the platform is in an initializing state, it's not fully functional. Requests will queue up and run once platform is initialized. For example: com.meta.horizon.platform.ovr.requests.UserAgeCategory#get() can be called immediately after asynchronous init and once platform is initialized, this request will run Synchronous functions will return the default value;
Parameters
context
The Android Context to bind to the Platform.
Returns
The request that can be used to register a callback and respond to the com.meta.horizon.platform.ovr.enums.PlatformInitializeResult in the payload.
Asynchronously initialize Platform SDK.This overload will attempt to read the Oculus App Id from the AndroidManifest.While the platform is in an initializing state, it's not fully functional. Requests will queue up and run once platform is initialized. For example: com.meta.horizon.platform.ovr.requests.UserAgeCategory#get() can be called immediately after asynchronous init and once platform is initialized, this request will run Synchronous functions will return the default value;
Parameters
context
The Android Context to bind to the Platform.
options
The options used to configure the Platform.
Returns
The request that can be used to register a callback and respond to the com.meta.horizon.platform.ovr.enums.PlatformInitializeResult in the payload.
Asynchronously initialize Platform SDK.While the platform is in an initializing state, it's not fully functional. Requests will queue up and run once platform is initialized. For example: com.meta.horizon.platform.ovr.requests.UserAgeCategory#get() can be called immediately after asynchronous init and once platform is initialized, this request will run Synchronous functions will return the default value;
Parameters
appID
The Oculus App Id to use for the Platform.
context
The Android Context to bind to the Platform.
Returns
The request that can be used to register a callback and respond to the com.meta.horizon.platform.ovr.enums.PlatformInitializeResult in the payload.
Asynchronously initialize Platform SDK.While the platform is in an initializing state, it's not fully functional. Requests will queue up and run once platform is initialized. For example: com.meta.horizon.platform.ovr.requests.UserAgeCategory#get() can be called immediately after asynchronous init and once platform is initialized, this request will run Synchronous functions will return the default value;
Parameters
appID
The Oculus App Id to use for the Platform.
context
The Android Context to bind to the Platform.
options
The options used to configure the Platform.
Returns
The request that can be used to register a callback and respond to the com.meta.horizon.platform.ovr.enums.PlatformInitializeResult in the payload.
Pops the next message from the message queue.
Returns
the next Message, or null if there are no more messages.
static long getLoggedInUserID ( )
Makes a HTTP GET request to the specified URL.
Parameters
url
The URL to make the request to.
messageType
The {@link com.meta.horizon.platform.ovr.Message::MessageType} associated with the request.
Returns
The request ID associated with the request.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon