智能客服
你问我答,随时在线为你解决问题

























本章节主要介绍目标应用接入系统分享面板时,所涉及的设计规范要求。具体参见:设计指南-分享方式区
当应用实现了用于接收分享内容的UIAbility或者UIExtensionAbility后,可在配置文件(src/main/module.json5)的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
- }
- ]
- }
- ]
- }
- ]
智能客服
你问我答,随时在线为你解决问题
合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
解决方案
精准高效的一站式服务支持,助力开发者商业成功