Requires WMPF >= 2.1.0. It is recommended to read the Notes before use.
Warm up Mini Program, load the specified Mini Program in the background in advance, and accelerate the startup of Mini Program.
Invocation Parameters
| Parameter | Required | Type | Description | Minimum Version |
|---|---|---|---|---|
| params | Yes | WMPFStartAppParams | Mini Program Launch parameters, consistent with launchMiniProgram |
|
| point | No | Point | Expected floating window size |
Return Parameters
None
Error Code errCode
| Value | Description |
|---|---|
| 0 | Success. |
| -1 | Invalid parameters |
| -2 | The Mini Program to be pre-warmed is already running |
| -3 | Network issues |
| -4 | WMPF internal error |
| -5 | WMPF internal error |
| -6 | WMPF internal error |
| -7 | WMPF internal error |
| -8 | WMPF does not support pre-warming |
| -9 | WMPF internal error |
| -10 | wmpf-cli does not have permission to pre-warm |
| -11 | WMPF internal error |
| -12 | Mini Program pre-warming interrupted |
| -13 | Mini Program pre-warming interrupted because the user logged out |
Sample Code
val miniProgramApi = WMPF.getInstance().getMiniProgramApi()
miniProgramApi.warmUpApp(WMPFStartAppParams(...))