Guides & References

"Discover the ultimate guides and references for app linking with HMS Unity Plugin Kits and Services.

App Linking allows you to create cross-platform links that can work as defined regardless of whether your app has been installed by a user.

(Optional) Configure clipboard reading rules. When an app that has integrated the App Linking SDK is launched for the first time, the SDK reads content on the clipboard to obtain link information, which can reach the specific in-app content.

<meta-data
    android:name="com.huawei.agconnect.applinking.READ_CLIPBOARD_PERMISSION"
    android:value="xxxx"/> 

If the value is set to Available, the App Linking SDK will read content on the clipboard each time the app is launched. If the value is set to Unavailable, the App Linking SDK will not read content on the clipboard.

Before You Start

Add an intent filter to the manifest file of your Android project, to specify how to process a link of App Linking.

<intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <!-- Set android:host to the prefix of your App Linking deep link or Android deep link. Set android:scheme to a custom scheme. -->
    <data android:host="xxx.com" android:scheme="xxx"/>
</intent-filter>

To receive app links (a special type of deep link, available in Android 6.0 and later), add the following configuration to the activity for processing links:

<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <!-- Set android:host to the prefix of your link to be processed. -->
    <data android:host="xxx" android:scheme="http"/>
    <!-- Set android:host to the prefix of your link to be processed. -->
    <data android:host="xxx" android:scheme="https"/>
</intent-filter>

Last updated