loadOfflineFile(params: Object)
Requires:
WearKit≥1.1.3@ray-js/ray≥1.7.82
Platforms:
iOSAndroid
Description
Download offline file.
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | Device ID |
channel | number | Yes | t.Integer; Select channel 0: Unspecified 1: BLE 2: AP |
sessionId | number | Yes | 0 indicates starting a new task; task ID |
complete | () => void | No | Completion callback (executed on both success and failure) |
| No | Callback on successful API call | ||
fail | (params: Object) => void | No | Failure callback |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Error Code
| Error Code | Error Message |
|---|---|
10001 | Internal error |
10090 | Failed to get offline file list |
10091 | Failed to enable hotspot |
10092 | Failed to connect to hotspot |
10093 | Failed to get hotspot routing |
10094 | Wi-Fi permission not enabled |
10095 | Abnormal transfer rate (speed is 0 for 10s continuously) |
10096 | Wi-Fi hotspot connection has been disconnected |
10300 | Hotspot has been connected by another device |
10301 | Check Wi-Fi permission/LAN/network |
10302 | VPN enabled or AP channel is occupied |
10303 | AP connection timed out, please restart the device |
10304 | Cannot connect when the app is in the background |
10305 | Authorization error |