目录

One-Step Access to Received Data on the Target Device

To ensure better receiving experience on the Huawei Share target device and standardize the experience of direct access to the received shared data, the target device processes the received data according to the following rules.

Receiving Capability Data Type Storage Location Preview Mode
One-step access Media (only image and video files)

PCs/2-in-1 devices: Huawei Share directory in the file manager

Other devices: Huawei Share album in the gallery

PCs/2-in-1 devices: The received files are highlighted in the file manager.

Other devices: The received files are in large image preview mode in the gallery.

One-step access

Link

(App Linking)

N/A Directly goes to a specified in-app page. If the app is not installed, the browser or AppGallery is started (depending on the App Linking configuration).
One-step access Link (deep link) N/A Directly goes to a specified in-app page. If the app is not installed, a pop-up message is displayed to notify the user.
One-step access

Link

(common link, that is, other HTTP/HTTPS links except the special links identified by the system)

N/A Opens the corresponding link in the browser.
One-step access Text Stored as a TXT file in the Huawei Share directory in the file manager The file is opened in preview mode.
One-step access File Huawei Share directory in the file manager

PCs/2-in-1 devices: The received files are highlighted in the file manager.

Other devices: If there is only one file, the file is opened in preview mode. If there are multiple files, the files are highlighted.

One-step access Custom type (excluding the UTD types preconfigured in the system) Huawei Share directory in the file manager If a compatible app is available, it launches directly. If no such app is available, a message is displayed.
Receiving data in sandbox mode File (including preconfigured and custom file types) Specified directory in the app sandbox The app handles the preview.

Direct Access to the Specified App

Starting from version 6.0.0(20) Beta3, Tap to Transfer supports the capability of starting a specified app.

In addition to the preceding default direct access modes, apps under the same developer account support the following startup rules:

[h2]Restrictions on Capabilities

[h2]Configuration Example

Configure metadata in the configuration file src/main/module.json5 to implement the feature.

{
  "module": {
    "abilities": [
      {
        "name": "EntryAbility",
        "srcEntry": "./ets/entryability/EntryAbility.ets",
        "startWindowIcon": "$media:launcher",
        "startWindowBackground": "$color:start_window_background",
        "exported": true,
        "skills": [
          {
            "entities": [
              "entity.system.home",
            ],
            "actions": [
              "ohos.want.action.viewData"
            ],
            "uris": [
              {
                "scheme": "file",
                "linkFeature": "FileOpen",
                "type": "org.openxmlformats.wordprocessingml.document",
                "maxFileSupported": 1
              }
            ],
            "domainVerify": true
          }
        ]
      },
    ],
    "metadata": [
      {
        "name": "shareType",
        "value": "sharekitModel",
      },
      {
        "name": "shareBundleName",
        "value": "com.example.sharekitPhone",
      },
      {
        "name": "shareBundleName",
        "value": "com.example.sharekitPc",
      }
    ]
  }
}