getLaunchOptions(params: Object)
Requires:
MiniKit≥1.0.0@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Description
Get the parameters at mini program startup. Same as the callback parameters of App.onLaunch.
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
complete | () => void | No | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
success callback parameters
| Property | Type | Description | MiniKit Since |
|---|---|---|---|
path | string | Path used to launch the mini program (package path) | v3.2.0 |
scene | 1000 | 1001 | 1002 | Scene value for launching the mini program | v3.15.0 |
| Query parameters used to launch the mini program | v3.2.0 | ||
| Share | v3.2.0 | ||
apiCategory | string | API category: default: default category; embedded: embedded, a mini program opened via the half-screen mini program capability | v3.2.0 |
| Additional parameters for launching the mini program, typically container-attached parameters rather than business parameters | v3.21.0 | ||
renderer | string | Rendering type: native indicates Lynx self-rendering; empty/other indicates Web | v3.37.0 |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Valid Values
success.params.scene
| Value | Description | MiniKit Since |
|---|---|---|
1000 | Default value | v3.15.0 |
1001 | Launched via the Recently Used Mini Programs list | v3.15.0 |
1002 | Launched via URL mapping | v3.15.0 |