• Home
Name Date Size #Lines LOC

..--

AppScope/12-May-2024-3633

entry/12-May-2024-1,2441,050

screenshots/device/12-May-2024-

.gitignoreD12-May-2024121 88

README.mdD12-May-20241 KiB2814

README_zh.mdD12-May-20241.4 KiB4121

build-profile.json5D12-May-20241 KiB4341

hvigorfile.jsD12-May-2024168 21

package.jsonD12-May-2024376 1818

README.md

1# Cellular Data
2
3### Introduction
4
5This sample shows how to use cellular data APIs to obtain SIM card information.
6
7### Usage Instruction
8
91. Set the default SIM card. The default SIM card is rendered with a blue background.
10
112. Enable or disable the mobile data service. **Turn On** is displayed if the mobile data service is enabled, and **Turn Off** is displayed otherwise.
12
133. Enable or disable the roaming service. **Turn On** is displayed if the roaming service is enabled, and **Turn Off** is displayed otherwise.
14
154. Check **Data Flow Type** for the data flow status of the default SIM card.
16
175. Check **Connect Data** for the data connection status of the default SIM card.
18
19### Constraints
20
211. This sample can only be run on standard-system devices.
22
232. The device must support the SIM card function and have a SIM card installed.
24
253. This sample demonstrates the stage model, which supports only API version 9.
26
274. This sample requires DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022) to compile and run.
28

README_zh.md

1# 蜂窝数据
2
3### 介绍
4
5本示例通过获取SIM卡相关信息,展示打开本应用时网络信息。
6
7本示例使用 [@Builder](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/ui/ts-component-based-builder.md) 在一个自定义组件内快速生成多个布局内容。
8
9本示例使用 [SystemCapability.Telephony.CellularData系统能力](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-telephony-data.md) 获取SIM卡信息及网络信息。
10
11使用说明:
12
131.默认移动数据的SIM卡背景色显示为蓝色。
14
152.若已经开启移动数据,则显示开启,否则显示为关闭。
16
173.若已经开启漫游服务,则显示开启,否则显示为关闭。
18
194.显示打开本应用时数据流类型及连接状态。
20
21### 效果预览
22
23![](screenshots/device/index.png)
24
25### 依赖
26
27不涉及。
28
29### 相关权限
30
31网络服务:[ohos.permission.GET_NETWORK_INFO](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/permission-list.md)
32
33### 约束与限制
34
351.本示例仅支持标准系统上运行,支持设备:仅支持部分机型。
36
372.本示例仅支持API9版本SDK,版本号:3.2.5.5 Beta2。
38
393.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。
40
414.本示例需设备支持SIM卡功能,且插入SIM卡。