目录

Target App Design Specifications

This section describes the design specifications for the target app integrated with the system sharing panel. For details, please refer to Design - Sharing Mode Area.

App Name and Icon Specifications

After implementing the UIAbility or UIExtensionAbility for receiving the shared content in your target app, you can register the supported shared data types in the skills section of the configuration file (src/main/module.json5), and set actions to ohos.want.action.sendData.

If the shared content type is supported by the target app, the target app's icon will appear in the sharing mode area of the sharing panel.

You can set different names and icons for different abilities.

Example:

"abilities": [
  {
    "name": "TestUIAbility",
    "srcEntry": "./ets/entryability/TestUIAbility.ets",
    "label": "$string:EntryAbility_label", // Ability name.
    "icon": "$media:layered_image", // Ability icon.
    "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", // Support the processing of shared data.
    "exported": true,
    "label": "$string:xx_label", // Ability name.
    "icon": "$media:icon", // Ability icon.
    "description": "$string:TestShareAbility_desc",
    "skills": [
      {
        "actions": [
          "ohos.want.action.sendData"
        ],
        "uris": [
          {
            "scheme": "file",
            "utd": "general.text",
            "maxFileSupported": 1
          }
        ]
      }
    ]
  }
]