Functions - Application¶
Related Oculus Platform documentation:
- https://developer.oculus.com/documentation/native/ps-deep-linking/
- https://developer.oculus.com/documentation/native/ps-events/
Signals¶
app_launch_intent_changed¶
About
This signal will be emitted when the launch intent changes. For example, if another app launched this app, and this app is already loaded in the background.
The signal will contain a String with the type of the intent.
You should call application_get_launch_details to get more information about the launch.
Functions¶
application_get_version¶
application_get_version()
Returns information about the current application.
Returns: A GDOculusPlatformPromise that will contain a Dictionary with information about the current app version if fulfilled. The promise will error if the request couldn't be completed.
Example response:
release_dateis in seconds (epoch)update_sizeis in bytes
Example
application_launch_other_app¶
application_launch_other_app(app_id : String, deeplink_options : Dictionary)
Sends a request to the Oculus Platform to launch another app. The app_id argument is the ID of the other app you wish to launch. The deeplink_options argument is optional.
Returns: A GDOculusPlatformPromise that will contain a String with information about the request if fulfilled. The promise will error if the request couldn't be completed.
Example of deeplink_options:
If you decide to include deeplink_options, the only required field is deeplink_message. The other fields can be used to interact with other APIs, but they are not required.
Example
application_get_launch_details¶
application_get_launch_details()
Used to retrieve information about the launch. Can be used to deep link applications and know if another app requested the launch, among other things.
Returns: A Dictionary with information about the app's launch.
Example response:
launch_typecan be:DEEPLINK,COORDINATED,INVITE,NORMALorUNKNOWN.launch_sourcecan be used to distinguish where the deeplink came from. For example, aDEEPLINKlaunch type could be coming from events or rich presence.usersis aDictionarythat could be populated with other users the current user may want to be with.
More info about next_page_url.
application_start_app_download¶
application_start_app_download()
Starts downloading the latest app update (if there is one).
Returns: A GDOculusPlatformPromise that will contain a Dictionary with information about the request once the operation is finished. The promise will error if the request couldn't be completed.
Example response:
install_resultcan be:UNKNOWN,LOW_STORAGE,NETWORK_ERROR,DUPLICATE_REQUEST,INSTALLER_ERROR,USER_CANCELLED,AUTHORIZATION_ERRORorSUCCESS.
Notes
According to the docs, this method will return until a problem occurs or the app finishes downloading.
Example
application_check_app_download_progress¶
application_check_app_download_progress()
Requests the download progress of the latest app update (if there is one).
Returns: A GDOculusPlatformPromise that will contain a Dictionary with information about the current app update download. The promise will error if the request couldn't be completed.
Example response:
statuscan be:UNKNOWN,ENTITLED,DOWNLOAD_QUEUED,DOWNLOADING,INSTALL_QUEUED,INSTALLING,INSTALLEDorUNINSTALLED.
application_cancel_app_download¶
application_cancel_app_download()
Cancels the current download of the latest app update (if there is one).
Returns: A GDOculusPlatformPromise that will contain a Dictionary with information about the request once the operation is finished. The promise will error if the request couldn't be completed.
Example response:
install_resultcan be:UNKNOWN,LOW_STORAGE,NETWORK_ERROR,DUPLICATE_REQUEST,INSTALLER_ERROR,USER_CANCELLED,AUTHORIZATION_ERRORorSUCCESS.
application_install_app_update_and_relaunch¶
application_install_app_update_and_relaunch(deeplink_options : Dictionary)
Installs the latest app update (if there is one) and launches the application again once the install finishes. The deeplink_options argument is optional.
Returns: A GDOculusPlatformPromise that will contain a Dictionary with information about the request. The promise will error if the request couldn't be completed.
Example response:
install_resultcan be:UNKNOWN,LOW_STORAGE,NETWORK_ERROR,DUPLICATE_REQUEST,INSTALLER_ERROR,USER_CANCELLED,AUTHORIZATION_ERRORorSUCCESS.
Example of deeplink_options:
If you decide to include deeplink_options, the only required field is deeplink_message. The other fields can be used to interact with other APIs, but they are not required.