We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
GuidesApplication ServicesShare KitSystem ShareShared Content Processing by a Target AppTarget App Design Specifications

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:

Collapse
Word wrap
Dark theme
Copy code
  1. "abilities": [
  2. {
  3. "name": "TestUIAbility",
  4. "srcEntry": "./ets/entryability/TestUIAbility.ets",
  5. "label": "$string:EntryAbility_label", // Ability name.
  6. "icon": "$media:layered_image", // Ability icon.
  7. "description": "$string:EntryAbility_desc",
  8. "startWindowIcon": "$media:startIcon",
  9. "startWindowBackground": "$color:start_window_background",
  10. "exported": true,
  11. "skills": [
  12. {
  13. "actions": [
  14. "ohos.want.action.sendData"
  15. ],
  16. "uris": [
  17. {
  18. "scheme": "file",
  19. "utd": "general.text",
  20. "maxFileSupported": 1
  21. }
  22. ]
  23. }
  24. ]
  25. }
  26. ],
  27. "extensionAbilities": [
  28. {
  29. "name": "TestShareAbility",
  30. "srcEntry": "./ets/abilities/TestShareAbility.ts",
  31. "type": "share", // Support the processing of shared data.
  32. "exported": true,
  33. "label": "$string:xx_label", // Ability name.
  34. "icon": "$media:icon", // Ability icon.
  35. "description": "$string:TestShareAbility_desc",
  36. "skills": [
  37. {
  38. "actions": [
  39. "ohos.want.action.sendData"
  40. ],
  41. "uris": [
  42. {
  43. "scheme": "file",
  44. "utd": "general.text",
  45. "maxFileSupported": 1
  46. }
  47. ]
  48. }
  49. ]
  50. }
  51. ]
Search in Guides
Enter a keyword.