androidjs

DeepLink API

app.deeplink is the instance of DeepLink API, which provide functions to enable DeepLink to your app content.

NOTE : In order to enable Deep Link to your app, you have to do all the following configurations.

First Update Your Package.JSON

In order to enable Deep Link to your app, you’ll have to define array of objects with following attributes in package.json file of your app

Example Configuration

{
  "deep-link":[
        {
            "scheme" : "http",
            "host" : "android-js.github.io"
        },
        {
            "scheme" : "https",
            "host" : "android-js.github.io"
        }
  ]
}

whenever user click on defined links or hosts, your app will be listed as suggestion to open that link in your app

Access Link In Your App

Methods

Returns a link on which user clicked to open that in your app

NOTE: returns link if available otherwise -1

An example of above code:

// In views of your app

let link = app.deeplink.getLink();
if(link != '-1') {
    app.loadURL(link);
}