| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| entry/ | 12-May-2024 | - | 1,746 | 1,595 | ||
| screenshots/device/ | 12-May-2024 | - | ||||
| .gitignore | D | 12-May-2024 | 121 | 8 | 8 | |
| README.md | D | 12-May-2024 | 1.1 KiB | 24 | 13 | |
| README_zh.md | D | 12-May-2024 | 2.3 KiB | 43 | 22 | |
| build-profile.json5 | D | 12-May-2024 | 1 KiB | 43 | 41 | |
| hvigorfile.js | D | 12-May-2024 | 174 | 2 | 1 | |
| package.json | D | 12-May-2024 | 371 | 19 | 18 |
README.md
1# SMS 2 3### Introduction 4 5This sample shows how to send SMS messages. 6 7### Usage 8 91. On the home page, click **Create Contact**. In the displayed dialog box, enter the contact name and phone number, and click **OK**. The contact is added to the contact list. 10 112. Click **Manage**. The button changes to **Cancel**, and the **x** sign is displayed on the contact list. Click the **x** sign if you want to delete a contact. Click **Cancel** if you want to quit, and the button changes back to **Manage**. 12 133. The **Send Message** icon is displayed on the right of each contact in the contact list. Click the icon to go to the page for sending SMS messages. 14 154. On the page for sending SMS messages, enter a message and click **Send** to send it. 16 17Note: 18- SMS messages can be successfully sent only when the required permission is granted and a SIM card is inserted. They are sent from the default SIM card. 19- Preset SMS messages are provided. Storage function is not available, and application data will be cleared each time you exit. 20 21### Constraints 22 23This sample can only be run on standard-system devices. 24
README_zh.md
1# 短信服务 2 3### 简介 4 5本示例展示了电话服务中发送短信的功能。实现效果如下: 6 7   8 9### 相关概念 10 11发送短信、获取发送短信的默认SIM卡槽ID、获取短信服务中心(SMSC)地址等。 12 13### 相关权限 14 15发送短信权限:ohos.permission.SEND_MESSAGES 16 17设置通话状态权限:ohos.permission.SET_TELEPHONY_STATE 18 19获取通话状态权限:ohos.permission.GET_TELEPHONY_STATE 20 21### 使用说明 22 231.首页点击**创建联系人**,弹框输入联系人姓名和电话,点击确定按钮后,联系人列表中添加该联系人。 24 252.点击**管理**,该按钮变成**取消**,联系人列表出现删除x按钮,点击x按钮可删除联系人,点击**取消**,按钮变成**管理**。 26 273.联系人列表中每个联系人右侧有**发送短信**图标按钮,点击该图标按钮跳转到发送短信页面。 28 294.发送短信页面,输入短信点击向上箭头的**发送**按钮,可以发送短信。 30 315.需授予短信发送权限且插入SIM卡才可成功发送短信,有预置短信内容,每次退出应用数据会清空,未添加存储功能,发送短信为默认卡发送。 32 33### 约束与限制 34 351.本示例仅支持在标准系统上运行。 36 372.本示例需要插入SIM卡,目前该功能仅支持部分机型。 38 393.本示例涉及使用系统接口:getSmscAddr(),需要手动替换Full SDK才能编译通过,具体操作可参考[替换指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/full-sdk-switch-guide.md)。 40 414.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 42 435.本示例所配置的权限ohos.permission.SEND_MESSAGES、ohos.permission.SET_TELEPHONY_STATE、ohos.permission.GET_TELEPHONY_STATE为system_basic级别(相关权限级别可通过[权限定义列表](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/permission-list.md)查看),需要手动配置对应级别的权限签名(具体操作可查看[自动化签名方案](https://docs.openharmony.cn/pages/v3.2Beta/zh-cn/application-dev/security/hapsigntool-overview.md/))。