目标应用设计规范
========

本章节主要介绍目标应用接入系统分享面板时，所涉及的设计规范要求。具体参见：[设计指南-分享方式区](https://developer.huawei.com/consumer/cn/doc/design-guides/share-0000001957076313#section132401520173711)

#### 应用名称和图标规范

当应用实现了用于接收分享内容的[UIAbility](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-apis-app-ability-uiability)或者[UIExtensionAbility](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-apis-app-ability-uiextensionability)后，可在配置文件（src/main/module.json5）的[skills](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/module-configuration-file#skills标签)配置中注册。并配置actions为ohos.want.action.sendData。

当分享内容类型为应用所支持的类型时，应用图标将出现在分享面板的分享方式区内。

应用可以针对不同的ability，设置不同的名称和图标。

示例：

"abilities": \[
  {
    "name": "TestUIAbility",
    "srcEntry": "./ets/entryability/TestUIAbility.ets",
    "label": "$string:EntryAbility\_label", // ability名称
    "icon": "$media:layered\_image", // ability图标
    "description": "$string:EntryAbility\_desc",
    "startWindowIcon": "$media:startIcon",
    "startWindowBackground": "$color:start\_window\_background",
    "exported": true,
    "skills": \[
      {
        "actions": \[
          "ohos.want.action.sendData"
        \],
        "uris": \[
          {
            "scheme": "file",
            "utd": "general.text",
            "maxFileSupported": 1
          }
        \]
      }
    \]
  }
\],
"extensionAbilities": \[
  {
    "name": "TestShareAbility",
    "srcEntry": "./ets/abilities/TestShareAbility.ts",
    "type": "share", // 支持分享数据处理
    "exported": true,
    "label": "$string:xx\_label", // ability名称
    "icon": "$media:icon", // ability图标
    "description": "$string:TestShareAbility\_desc",
    "skills": \[
      {
        "actions": \[
          "ohos.want.action.sendData"
        \],
        "uris": \[
          {
            "scheme": "file",
            "utd": "general.text",
            "maxFileSupported": 1
          }
        \]
      }
    \]
  }
\]