The basic concept

Deep Link is also called Deep linking.

In terms of user experience, Deep Link is a technology that allows you to click on the Search results in the browser /Google Search on your mobile phone and directly jump to a page in an installed application.

For operators who do not know technology, it is a sharing function. From the technical level, it is simple to realize the realization of bringing an APP user to the corresponding content page of another APP, realizing the seamless jump between apps!

Commercial value

I’m sure you’ve seen a page like this at some point:

There is an “Open in App” at the bottom. Click and jump to the corresponding page of the App if the App has been installed, or jump to the Download page if the App has not been installed.

Deeplink

For apps already installed, point to a specific page, as described above.

Deferred Deeplink

Compared to Deeplink, it adds the ability to determine if an APP has been installed and if a user is a match.

  • 1. Determine whether the APP is installed when the user clicks the link. If not, direct the user to the APP store to download the APP.
  • 2. User matching function: When the user clicks the link and when the user starts the APP, the Device Fingerprint information of the user is transmitted to the server for fuzzy matching, so that the user can directly open the corresponding specified page when downloading and starting the APP.

Through the above two technical solutions, not only: (1) can be distributors faster and more convenient to make the APP, and returned to the specified event page, and: (2) can guide not installed APP users to download APP, and (3) the relationship between the distributors and distributors chain will fingerprint information recorded by equipment, gives the corresponding reward in the business scenario.

Before and after using Deeplink:

The basic use

See Demo: WebViewStudy

HTML page:deeplink.html

<a href="[scheme]://[host]/[path]? [query]">Start the application</a> 
Copy the code

Example:

<a href="will://link/testId">Open immediately (directly) &gt; &gt;</a>
Copy the code

AndroidManifest.xml

<! Scheme_Adr: 'will://link/testid',-->
        <activity android:name=".DeepLinkActivity">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data
                    android:host="link"
                    android:scheme="will" />
            </intent-filter>
        </activity>
    </application>
Copy the code

MyWebViewClient.class

    @SuppressWarnings("deprecation")
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        if (TextUtils.isEmpty(url)) {
            return false;
        }
        try {
            // For DeepLink tests
            if (url.startsWith("will://")) {
                Uri uri = Uri.parse(url);
                Log.e("---------scheme", uri.getScheme() + "; host: " + uri.getHost() + "; Id: " + uri.getPathSegments().get(0));
            }

            Intent intent1 = new Intent();
            intent1.setAction("android.intent.action.VIEW");
            Uri uri = Uri.parse(url);
            intent1.setData(uri);
            intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            mActivity.startActivity(intent1);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return true;
    }
Copy the code

DeepLinkActivity.java

   /** * Get data from deep link * 'will://share '*/
    private void getDataFromBrowser(TextView textView) {
        Uri data = getIntent().getData();
        try {
            String scheme = data.getScheme();
            String host = data.getHost();
            List<String> params = data.getPathSegments();
            // Data sent from the page
            String testId = params.get(0);
            String text = "Scheme: " + scheme + "\n" + "host: " + host + "\n" + "params: " + testId;
            Log.e("ScrollingActivity", text);
            textView.setText(text);
        } catch(Exception e) { e.printStackTrace(); }}Copy the code

Page display:

Scheme: Will host: link params: testIdCopy the code

Realize the principle of

One of the core technologies DeepLink uses is URL SCHEMES. Whether it’s IOS or Android. URL Schemes have two words:

  • URL, as we all know, www.apple.com is just a URL, also called a link or a web address;
  • Schemes refer to a location in a URL — the initial location, which is just before ://. www.apple.com, for example, is HTTP.

We can use a special URL to locate an application or even a specific function in the application, just like locating a web page. For this app, go to the Access Schemes section of the URL. However, please note that there are different URL Schemes for apps, that is to say, one app can have multiple names, and different URL Schemes can have the same names.

For Android applications, some URL Schemes are defined such as SMS:, tel: and email mailto:. Please avoid naming your APP URL Schemes the same as system application names.

<a href="tel:15088888888">The phone</a>
<a href="sms:15088888888">SMS</a>
<a href="mailto:[email protected]">mail</a>
Copy the code

URL Schemes, like urls, can also pass arguments to access specific APP interfaces.

  • URL: images.google.com/images?q= Key…
  • URL Schemes: weixin://dl/moments

Applink

Basic introduction

Verify Android App Links

Android App Links is a special kind of Deep Links, which enables the Android system to open the corresponding content page of the application directly through the website address, without requiring the user to choose which application to handle the website address.

To add Android App Links to your App, define an Intent filter that opens the App with an Http(S) address and verify that you actually own the App and the website. If the system successfully verifies that you own the site, the system routes the intent corresponding to the URL directly to your application.

In order to verify your ownership of your app and website, the following two steps are necessary:

  • 1. AndroidManifest requires the system to automatically verify the ownership of App Links. This configuration tells the Android system to verify that your app belongs to the URL specified in the Intent filter.
  • 2. Place a Json file with a digital asset link in the following link address to declare the relationship between your url and your app:
  • https://domain.name/.well-known/assetlinks.json

Differences with Deep Links

  • Deep Links is an intent filter that allows the user to enter the application for a particular Activity. Clicking on such a link might bring up a list of apps (including yours) that can handle the link. Figure 1 shows a situation where a user clicks on a map-related link and a list of options pops up, asking the user to choose whether to use the map app or Chrome.

  • App Links is a verified Deep Links based on your website address. Therefore, clicking on one of these links will directly open your app (if installed) and the system will not pop up a selection list. Of course, the user can later change the configuration Settings to specify which application handles such links.

The following list describes more differences:

item Deep Links App Links
Intent URL Scheme HTTPS, HTTP, or custom The value must be HTTP or HTTPS
Intent Action Any Action forandroid.intent.action.VIEW
Intent Category Any Category forandroid.intent.category.BROWSABLEandandroid.intent.category.DEFAULT
Link to verify Don’t need You need to place a link to a digital asset on your website that can be accessed via HTTPS
The user experience A list of options may pop up for the user to choose which application to use to process the connection With no pop-ups, the system opens your app directly and handles the connection to the website
compatibility All Android versions Android 6.0 and above

To summarize

  • 1. If an APP wants to be opened directly by other apps, it must support itself and make itself capable of being opened by others. (URL Schemes)
  • 2. Apps To open other apps, you need to support your own. (Determine whether the device is installed and handle various jumps)

Since most apps, such as Weibo, wechat and third-party browsers (including Chrome), do not throw urls to the system (scheme is blocked), App Links only works in limited ways, such as jumping from notepad apps and SMS apps. The general commercial implementation is to open the system browser, through the system browser to open the corresponding page of the application.

Jingdong and Taobao’s CPS are implemented in this way. Jingdong CPS commodity promotion access process Android ALIbaichuan CPS SDK access process

URL Schemes for popular apps

Zhihu ://answers/{id} zhihu://answers/{id} Weixin: / / dl/scan scan weixin: / / dl/feed back weixin: / / dl/moments friends weixin: / / dl/Settings set weixin: / / dl/notifications Notification Settings weixin: / / dl/chat chat set weixin: / / dl/general general Settings weixin: / / dl/officialaccounts public weixin: / / dl/games game weixin: / / dl/help Help weixin://dl/feedback weixin://dl/profile personal information weixin://dl/features

TencentWeibo:// taobao:// alipay:// sinaweibo:// weico weibo: weico:// QQ browser: mqqbrowser:// uc browser:// Ucbrowser :// dolphin:// SogouMSE:// baidumap:// Chrome: googlechrome:// youku:// jingdong: Openapp. Jdmoble: / / everyone: renren: / / Meituan: imeituan: store: / / 1 wccbyihaodian: / / I check: WCC: / / youdao dictionary: ddictproapp: / / comment: dianping: / / micro plate: Sinavdisk :// Doubanradio :// netease open lesson: ntesopen:// taobao://http://s.taobao.com/?q= [prompt] taobao shop search: taobao: / / http://shopsearch.t

Refer to the link

  • What is Deep Link
  • Deeplink technology helps apps operate and achieve viral user growth
  • What is deeplink technology on the hot app right now?
  • Understand Android DeepLink in 5 minutes
  • Android AppLinks access
  • Android M App Links implementation details
  • Mobile DeepLink’s past and present lives