Usage
Once after you configure the deep links in the settings, your app is ready to accept the deep links. Your app gets opened if the deep link matches the settings and you can redirect the user to the required page as per the data in the deep link.

Listening to events

You can listen to both Custom Scheme deep links or Universal Deep links from your app by registering to following events
DeepLinkServices.OnCustomSchemeUrlOpen DeepLinkServices.OnUniversalLinkOpen
OnCustomSchemeUrlOpen event will be fired when user clicks on custom scheme deep link. OnUniversalLinkOpen event will be fired when user clicks on a universal deep link.
For the above events you get a uri instance in the result and a raw url string. From uri you can get the scheme, host and path for taking the action as required.
1
private void OnEnable ()
2
{
3
DeepLinkServices.OnCustomSchemeUrlOpen += OnCustomSchemeUrlOpen;
4
DeepLinkServices.OnUniversalLinkOpen += OnUniversalLinkOpen;
5
}
6
7
private void OnDisable ()
8
{
9
DeepLinkServices.OnCustomSchemeUrlOpen -= OnCustomSchemeUrlOpen;
10
DeepLinkServices.OnUniversalLinkOpen -= OnUniversalLinkOpen;
11
}
Copied!
1
private void OnCustomSchemeUrlOpen (DeepLinkServicesDynamicLinkOpenResult result)
2
{
3
Debug.Log("Handle deep link : " + result.Url);
4
}
5
6
private void OnUniversalLinkOpen (DeepLinkServicesDynamicLinkOpenResult result)
7
{
8
Debug.Log("Handle deep link : " + result.Url);
9
}
Copied!
Last modified 1yr ago
Copy link