提交 3d8fa232 编写于 作者: G Gloria

Update docs against 9955

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 bb011bf9
......@@ -86,6 +86,7 @@
- bundle/[PermissionDef](js-apis-bundle-PermissionDef.md)
- bundle/[RemoteAbilityInfo](js-apis-bundle-remoteAbilityInfo.md)
- bundle/[ShortcutInfo<sup>(deprecated)</sup>](js-apis-bundle-ShortcutInfo.md)
- bundle/[PackInfo](js-apis-bundle-PackInfo.md)
- UI Page
- [@ohos.animator](js-apis-animator.md)
- [@ohos.mediaquery](js-apis-mediaquery.md)
......@@ -133,7 +134,6 @@
- [@ohos.data.dataShare](js-apis-data-dataShare.md)
- [@ohos.data.dataSharePredicates](js-apis-data-dataSharePredicates.md)
- [@ohos.data.dataShareResultSet](js-apis-data-DataShareResultSet.md)
- [@ohos.data.distributedData](js-apis-distributed-data.md)
- [@ohos.data.distributedDataObject](js-apis-data-distributedobject.md)
- [@ohos.data.preferences](js-apis-data-preferences.md)
- [@ohos.data.rdb](js-apis-data-rdb.md)
......@@ -160,9 +160,13 @@
- [@ohos.telephony.sms](js-apis-sms.md)
- Network Management
- [@ohos.net.connection](js-apis-net-connection.md)
- [@ohos.net.ethernet](js-apis-net-ethernet.md)
- [@ohos.net.http](js-apis-http.md)
- [@ohos.net.policy](js-apis-net-policy.md)
- [@ohos.net.sharing](js-apis-net-sharing.md)
- [@ohos.net.socket](js-apis-socket.md)
- [@ohos.net.statistics](js-apis-net-statistics.md)
- [@ohos.net.tlsSocket](js-apis-tlsSocket.md)
- [@ohos.net.webSocket](js-apis-webSocket.md)
- [@ohos.request](js-apis-request.md)
- Connectivity
......@@ -174,8 +178,8 @@
- [@ohos.rpc](js-apis-rpc.md)
- [@ohos.wifi](js-apis-wifi.md)
- [@ohos.wifiext](js-apis-wifiext.md)
- [@ohos.nfc.tag](js-apis-nfctech.md)
- [@ohos.nfc.tag](js-apis-tagSession.md)
- tag/[nfctech](js-apis-nfctech.md)
- tag/[tagSession](js-apis-tagSession.md)
- Basic Features
- [@ohos.accessibility](js-apis-accessibility.md)
- [@ohos.accessibility.config](js-apis-accessibility-config.md)
......@@ -196,6 +200,7 @@
- [@ohos.systemTime](js-apis-system-time.md)
- [@ohos.systemTimer](js-apis-system-timer.md)
- [@ohos.wallpaper](js-apis-wallpaper.md)
- [console](js-apis-logs.md)
- [Timer](js-apis-timer.md)
- Device Management
......@@ -257,6 +262,7 @@
- APIs No Longer Maintained
- [@ohos.bytrace](js-apis-bytrace.md)
- [@ohos.data.storage](js-apis-data-storage.md)
- [@ohos.data.distributedData](js-apis-distributed-data.md)
- [@ohos.prompt](js-apis-prompt.md)
- [@ohos.reminderAgent](js-apis-reminderAgent.md)
- [@system.app](js-apis-system-app.md)
......@@ -278,4 +284,3 @@
- [@system.sensor](js-apis-system-sensor.md)
- [@system.storage](js-apis-system-storage.md)
- [@system.vibrator](js-apis-system-vibrate.md)
- [console](js-apis-logs.md)
\ No newline at end of file
# Ethernet Connection Management
The Ethernet Connection Management module provides wired network capabilities, which allow users to set the IP address, subnet mask, gateway, and Domain Name System (DNS) server of a wired network.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
```js
import ethernet from '@ohos.net.ethernet'
```
## ethernet.setIfaceConfig
setIfaceConfig(iface: string, ic: InterfaceConfiguration, callback: AsyncCallback\<void>): void;
Sets the network interface configuration. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------- | ---- | ------------------------------------------ |
| iface | string | Yes | Name of the network interface. |
| ic | [InterfaceConfiguration](#interfaceconfiguration) | Yes | Network interface configuration to set. |
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, the return result is empty. If the operation fails, an error code is returned.|
**Example**
```js
ethernet.setIfaceConfig("eth0", {mode:ethernet.STATIC,ipAddr:"192.168.1.123", routeAddr:"192.168.1.1",
gateAddr:"192.168.1.1", maskAddr:"255.255.255.0", dnsAddr0:"1.1.1.1", dnsAddr1:"2.2.2.2"},
(error) => {
if (error) {
console.log("setIfaceConfig callback error = " + error);
} else {
console.log("setIfaceConfig callback ok ");
}
});
```
## ethernet.setIfaceConfig
setIfaceConfig(iface: string, ic: InterfaceConfiguration): Promise\<void>;
Sets the network interface configuration. This API uses a promise to return the result.
**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------------------------------------------------- | ---- | ------------------------ |
| iface | string | Yes | Name of the network interface. |
| ic | [InterfaceConfiguration](#interfaceconfiguration) | Yes | Network interface configuration to set.|
**Return value**
| Type | Description |
| ------------------- | ----------------------------------------------------------- |
| Promise\<void> | Promise that returns no value.|
**Example**
```js
ethernet.setIfaceConfig("eth0", {mode:ethernet.STATIC,ipAddr:"192.168.1.123", routeAddr:"192.168.1.1",
gateAddr:"192.168.1.1", maskAddr:"255.255.255.0", dnsAddr0:"1.1.1.1", dnsAddr1:"2.2.2.2"}).then(() => {
console.log("setIfaceConfig promiss ok ");
}).catch((error) => {
console.log("setIfaceConfig promiss error = " + error);
});
```
## ethernet.getIfaceConfig
getIfaceConfig(iface: string, callback: AsyncCallback\<InterfaceConfiguration>): void;
Obtains the configuration of a network interface. This API uses an asynchronous callback to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ----------------------------------------------- | ----- | ------------ |
| iface | string | Yes | Name of the network interface.|
| callback | AsyncCallback\<[InterfaceConfiguration](#interfaceconfiguration)> | Yes | Callback used to return the configuration. |
**Example**
```js
ethernet.getIfaceConfig("eth0", (error, value) => {
if (error) {
console.log("getIfaceConfig callback error = " + error);
} else {
console.log("getIfaceConfig callback mode = " + value.mode);
console.log("getIfaceConfig callback ipAddr = " + value.ipAddr);
console.log("getIfaceConfig callback routeAddr = " + value.routeAddr);
console.log("getIfaceConfig callback gateAddr = " + value.gateAddr);
console.log("getIfaceConfig callback maskAddr = " + value.maskAddr);
console.log("getIfaceConfig callback dns0Addr = " + value.dns0Addr);
console.log("getIfaceConfig callback dns1Addr = " + value.dns1Addr);
}
});
```
## ethernet.getIfaceConfig
getIfaceConfig(iface: string): Promise\<InterfaceConfiguration>;
Obtains the configuration of a network interface. This API uses a promise to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ------------ |
| iface | string | Yes | Name of the network interface.|
**Return value**
| Type | Description |
| --------------------------------- | ---------------------------------- |
| Promise\<[InterfaceConfiguration](#interfaceconfiguration)> | Promise used to return the configuration. |
**Example**
```js
ethernet.getIfaceConfig("eth0").then((data) => {
console.log("getIfaceConfig promiss mode = " + data.mode);
console.log("getIfaceConfig promiss ipAddr = " + data.ipAddr);
console.log("getIfaceConfig promiss routeAddr = " + data.routeAddr);
console.log("getIfaceConfig promiss gateAddr = " + data.gateAddr);
console.log("getIfaceConfig promiss maskAddr = " + data.maskAddr);
console.log("getIfaceConfig promiss dns0Addr = " + data.dns0Addr);
console.log("getIfaceConfig promiss dns1Addr = " + data.dns1Addr);
}).catch((error) => {
console.log("getIfaceConfig promiss error = " + error);
});
```
## ethernet.isIfaceActive
isIfaceActive(iface?: string, callback: AsyncCallback\<number>): void;
Checks whether a network interface is active. This API uses an asynchronous callback to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------- | ---- | -------------------------------------------------- |
| iface | string | No | Name of the network interface. If this parameter is left empty, the API checks for any active network interface. |
| callback | AsyncCallback\<number> | Yes | Callback used to return the result. The value **1** means that the network interface is active, **0** means that the network interface is inactive, and any other value means that an error has occurred.|
**Example**
```js
ethernet.isIfaceActive("eth0", (error, value) => {
if (error) {
console.log("whether2Activate callback error = " + error);
} else {
console.log("whether2Activate callback = " + value);
}
});
```
## ethernet.isIfaceActive
isIfaceActive(iface?: string): Promise\<number>;
Checks whether a network interface is active. This API uses a promise to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------------------------- |
| iface | string | No | Name of the network interface. If this parameter is left empty, the API checks for any active network interface.|
**Return value**
| Type | Description |
| ----------------| ------------------------------------------------------------------ |
| Promise\<number> | Promise used to return the result. The value **1** means that the network interface is active, **0** means that the network interface is inactive, and any other value means that an error has occurred.|
**Example**
```js
ethernet.isIfaceActive("eth0").then((data) => {
console.log("isIfaceActive promiss = " + data);
}).catch((error) => {
console.log("isIfaceActive promiss error = " + error);
});
```
## ethernet.getAllActiveIfaces
getAllActiveIfaces(callback: AsyncCallback\<Array\<string>>): void;
Obtains all active network interfaces. This API uses an asynchronous callback to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------ | ---- | ------------------------------ |
| callback | AsyncCallback\<Array\<string>> | Yes | Callback used to return all the active network interface names obtained.|
**Example**
```js
ethernet.getAllActiveIfaces((error, value) => {
if (error) {
console.log("getAllActiveIfaces callback error = " + error);
} else {
console.log("getAllActiveIfaces callback value.length = " + value.length);
for (let i = 0; i < value.length; i++) {
console.log("getAllActiveIfaces callback = " + value[i]);
}
}
});
```
## ethernet.getAllActiveIfaces
getAllActiveIfaces(): Promise\<Array\<string>>;
Obtains all active network interfaces. This API uses a promise to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
**Return value**
| Type | Description |
| ------------------------------ | ----------------------------------------------- |
| Promise\<Array\<string>> | Promise used to return all the active network interface names obtained.|
**Example**
```js
ethernet.getAllActiveIfaces().then((data) => {
console.log("getAllActiveIfaces promiss data.length = " + data.length);
for (let i = 0; i < data.length; i++) {
console.log("getAllActiveIfaces promiss = " + data[i]);
}
}).catch((error) => {
console.log("getAllActiveIfaces promiss error = " + error);
});
```
## InterfaceConfiguration
Defines the network configuration for the Ethernet connection.
**System capability**: SystemCapability.Communication.NetManager.Core
| Name | Type | Description |
| ----------------------- | ----------------------------------- | ------------------------------------------------------------ |
| mode | [IPSetMode](#ipsetmode) | Configuration mode of the Ethernet connection.|
| ipAddr | string | Static IP address of the Ethernet connection. The value must be an IPv4 address, which is a 32-bit number displayed in dotted decimal notation and each 8-bit field ranges from 0 to 255. This parameter does not need to be configured in Dynamic Host Configuration Protocol (DHCP) mode.|
| route | string | Route of the Ethernet connection. The value must be an IPv4 address. This parameter does not need to be configured in DHCP mode.|
| gateway | string | Gateway of the Ethernet connection. The value must be an IPv4 address. This parameter does not need to be configured in DHCP mode.|
| netMask | string | Subnet mask of the Ethernet connection. The value must be an IPv4 address. This parameter does not need to be configured in DHCP mode.|
| dnsServers | string | DNS server addresses of the Ethernet connection. The value must be an IPv4 address. This parameter does not need to be configured in DHCP mode. Multiple addresses are separated by commas (,).|
## IPSetMode
Defines the configuration mode of the Ethernet connection.
**System capability**: SystemCapability.Communication.NetManager.Core
| Name | Value | Description |
| ------------------------ | ---- | ---------------------- |
| STATIC | 0 | Static configuration.|
| DHCP | 1 | Dynamic configuration.|
此差异已折叠。
# Network Traffic Management
The Network Traffic Management module collects statistics on the mobile data traffic and allows you to query the data volume by network interface (cellular or Wi-Fi) or application.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
```js
import statistics from '@ohos.net.statistics'
```
## statistics.getIfaceRxBytes
getIfaceRxBytes(nic: string, callback: AsyncCallback\<number>): void
Obtains the volume of mobile data traffic received by a specified NIC. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| nic | string | Yes | NIC name.|
| callback | AsyncCallback\<number> | Yes | Callback used to return the data volume, in bytes.|
**Example**
```js
statistics.getIfaceRxBytes(this.nic, (err, data) => {
this.callBack(err, data);
console.log(JSON.stringify(error))
console.log(JSON.stringify(data))
})
```
## statistics.getIfaceRxBytes
getIfaceRxBytes(nic: string): Promise\<number>;
Obtains the volume of mobile data traffic received by a specified NIC. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| nic | string | Yes | NIC name.|
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
| Promise\<number> | Promise used to return the data volume, in bytes.|
**Example**
```js
statistics.getIfaceRxBytes(this.nic).then((err, data) {
console.log(JSON.stringify(err))
console.log(JSON.stringify(data))
})
```
## statistics.getIfaceTxBytes
getIfaceTxBytes(nic: string, callback: AsyncCallback\<number>): void
Obtains the volume of mobile data traffic sent by a specified NIC. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| nic | string | Yes | NIC name.|
| callback | AsyncCallback\<number> | Yes | Callback used to return the data volume, in bytes.|
**Example**
```js
statistics.getIfaceTxBytes(this.nic, (err, data) => {
this.callBack(err, data);
console.log(JSON.stringify(error))
console.log(JSON.stringify(data))
})
```
## statistics.getIfaceTxBytes
getIfaceTxBytes(nic: string): Promise\<number>;
Obtains the volume of mobile data traffic sent by a specified NIC. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| nic | string | Yes | NIC name.|
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
| Promise\<number> | Promise used to return the data volume, in bytes.|
**Example**
```js
statistics.getIfaceTxBytes(this.nic).then((err, data) {
console.log(JSON.stringify(err))
console.log(JSON.stringify(data))
})
```
## statistics.getCellularRxBytes
getCellularRxBytes(callback: AsyncCallback\<number>): void;
Obtains the volume of mobile data traffic received by the cellular network. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| callback | AsyncCallback\<number> | Yes | Callback used to return the data volume, in bytes.|
**Example**
```js
statistics.getCellularRxBytes((err, data) => {
this.callBack(err, data);
console.log(JSON.stringify(error))
console.log(JSON.stringify(data))
})
```
## statistics.getCellularRxBytes
getCellularRxBytes(): Promise\<number>;
Obtains the volume of mobile data traffic received by the cellular network. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
| Promise\<number> | Promise used to return the data volume, in bytes.|
**Example**
```js
statistics.getCellularRxBytes().then((err, data) {
console.log(JSON.stringify(err))
console.log(JSON.stringify(data))
})
```
## statistics.getCellularTxBytes
getCellularTxBytes(callback: AsyncCallback\<number>): void;
Obtains the volume of mobile data traffic sent by the cellular network. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| callback | AsyncCallback\<number> | Yes | Callback used to return the data volume, in bytes.|
**Example**
```js
statistics.getCellularTxBytes((err, data) => {
this.callBack(err, data);
console.log(JSON.stringify(error))
console.log(JSON.stringify(data))
})
```
## statistics.getCellularTxBytes
getCellularTxBytes(): Promise\<number>;
Obtains the volume of mobile data traffic sent by the cellular network. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
| Promise\<number> | Promise used to return the data volume, in bytes.|
**Example**
```js
statistics.getCellularTxBytes().then((err, data) {
console.log(JSON.stringify(err))
console.log(JSON.stringify(data))
})
```
## statistics.getAllRxBytes
getAllRxBytes(callback: AsyncCallback\<number>): void;
Obtains the volume of mobile data traffic received by all NICs. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| callback | AsyncCallback\<number> | Yes | Callback used to return the data volume, in bytes.|
**Example**
```js
statistics.getAllRxBytes(err, data) => {
this.callBack(err, data);
console.log(JSON.stringify(error))
console.log(JSON.stringify(data))
})
```
## statistics.getAllRxBytes
getAllRxBytes(): Promise\<number>;
Obtains the volume of mobile data traffic received by all NICs. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
| Promise\<number> | Promise used to return the data volume, in bytes.|
**Example**
```js
statistics.getAllRxBytes().then((err, data) {
console.log(JSON.stringify(err))
console.log(JSON.stringify(data))
})
```
## statistics.getAllTxBytes
getAllTxBytes(callback: AsyncCallback\<number>): void;
Obtains the volume of mobile data traffic sent by all NICs. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| callback | AsyncCallback\<number> | Yes | Callback used to return the data volume, in bytes.|
**Example**
```js
statistics.getAllTxBytes((err, data) => {
this.callBack(err, data);
console.log(JSON.stringify(error))
console.log(JSON.stringify(data))
})
```
## statistics.getAllTxBytes
getAllTxBytes(): Promise\<number>;
Obtains the volume of mobile data traffic sent by all NICs. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
| Promise\<number> | Promise used to return the data volume, in bytes.|
**Example**
```js
statistics.getAllTxBytes().then((err, data) {
console.log(JSON.stringify(err))
console.log(JSON.stringify(data))
})
```
## statistics.getUidRxBytes
getUidRxBytes(uid: number, callback: AsyncCallback\<number>): void;
Obtains the volume of mobile data traffic received by a specified application. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| uid | number | Yes | Application ID.|
| callback | AsyncCallback\<number> | Yes | Callback used to return the data volume, in bytes.|
**Example**
```js
statistics.getUidRxBytes(this.uid, (err, data) => {
this.callBack(err, data);
console.log(JSON.stringify(error))
console.log(JSON.stringify(data))
})
```
## statistics.getUidRxBytes
getUidRxBytes(uid: number): Promise\<number>;
Obtains the volume of mobile data traffic received by a specified application. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| uid | number | Yes | Application ID.|
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
| Promise\<number> | Promise used to return the data volume, in bytes.|
**Example**
```js
statistics.getUidRxBytes(this.uid).then((err, data) {
console.log(JSON.stringify(err))
console.log(JSON.stringify(data))
})
```
## statistics.getUidTxBytes
getUidTxBytes(uid: number, callback: AsyncCallback\<number>): void;
Obtains the volume of mobile data traffic sent by a specified application. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| uid | number | Yes | Application ID.|
| callback | AsyncCallback\<number> | Yes | Callback used to return the data volume, in bytes.|
**Example**
```js
statistics.getUidTxBytes(this.uid, (err, data) => {
this.callBack(err, data);
console.log(JSON.stringify(error))
console.log(JSON.stringify(data))
})
```
## statistics.getUidTxBytes
getUidTxBytes(uid: number): Promise\<number>;
Obtains the volume of mobile data traffic sent by a specified application. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.NetManager.Core
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| uid | number | Yes | Application ID.|
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
| Promise\<number> | Promise used to return the data volume, in bytes.|
**Example**
```js
statistics.getUidTxBytes(this.uid).then((err, data) {
console.log(JSON.stringify(err))
console.log(JSON.stringify(data))
})
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册