| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| entry/ | 12-May-2024 | - | 674 | 605 | ||
| screenshots/ | 12-May-2024 | - | ||||
| .gitignore | D | 12-May-2024 | 121 | 8 | 8 | |
| README.md | D | 12-May-2024 | 961 | 25 | 13 | |
| README_zh.md | D | 12-May-2024 | 2 KiB | 40 | 21 | |
| build-profile.json5 | D | 12-May-2024 | 1 KiB | 42 | 41 | |
| hvigorfile.js | D | 12-May-2024 | 174 | 2 | 1 | |
| package.json | D | 12-May-2024 | 294 | 16 | 15 |
README.md
1# Widget Host 2 3### Introduction 4 5This sample shows how to create and use a widget in the FA model, including creating, displaying, converting, updating, and deleting a widget. 6 7### Usage 8 91. Start the demo app. The main ability is started, and **eTSFormLauncher** is displayed on the page. 10 112. If the corresponding widget provider app has been installed, for example, [FA model Widget](../FormAbility/README.md) or [stage model widget](../FormExtAbility/README.md), the widget will be displayed. 12 13<img src="screenshots/eTSFormLauncherExample.png" alt="eTSFormLauncherExample" style="zoom:50%;" /> 14 153. Touch **castTempForm** to convert a temporary widget to a normal one. 16 174. Touch **updateForm** to update the widget. 18 195. Touch **deleteForm** to delete the widget. 20 21### Constraints 22 231. This sample can only be run on standard-system devices. 242. This sample requires DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022) to compile and run. 25
README_zh.md
1# 卡片使用方 2 3### 简介 4 5本示例展示了FA模型卡片使用方的创建与使用,包括创建与展示卡片、转换卡片、更新卡片、删除卡片等功能。实现效果如下: 6 7<img src="./screenshots/eTSFormLauncherExample.png" alt="eTSFormLauncherExample"/> 8 9### 相关概念 10 11卡片使用方:显示卡片内容的宿主应用,控制卡片在宿主中展示的位置。 12 13卡片管理服务:用于管理系统中所添加卡片的常驻代理服务,包括卡片对象的管理与使用,以及卡片周期性刷新等。 14 15### 相关权限 16 17允许应用查询其他应用的信息:ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 18允许应用获取Ability Form:ohos.permission.REQUIRE_FORM 19 20### 使用说明 21 221.启动应用,拉起MainAbility,页面正常显示**eTSFormLauncher**字样。 23 242.若此时已安装对应的卡片提供方应用,则会显示出卡片。 25 263.点击**castTempForm**按钮,则会把临时卡片转换为常规卡片。 27 284.点击**updateForm**按钮,则会更新卡片。 29 305.点击**deleteForm**按钮,则会删除卡片。 31 32### 约束与限制 33 341.本示例仅支持标准系统上运行。 35 362.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 37 383.本示例需要使用@ohos.application.formHost系统权限的系统接口。使用Full SDK时需要手动从镜像站点获取,并在DevEco Studio中替换,具体操作可参考[替换指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/full-sdk-switch-guide.md)。 39 404.本示例所配置的权限ohos.permission.GET_BUNDLE_INFO_PRIVILEGED、ohos.permission.REQUIRE_FORM为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/))。