Skip to content

Deep linking

Public API:

  • public static void RegisterDeeplinkCallback(DeeplinkCallback callback)Runtime/Affise.cs:88
  • public delegate void DeeplinkCallback(DeeplinkValue value);Runtime/Deeplink/IOnDeeplinkCallback.cs:6
  • public class DeeplinkValueRuntime/Deeplink/DeeplinkValue.cs:8

DeeplinkValue fields:

| Field | Type | |---|---| | Deeplink | string | | Scheme | string? | | Host | string? | | Path | string? | | Parameters | Dictionary<string, List<string>> |

Example:

Affise.RegisterDeeplinkCallback((value) =>
{
// full uri "scheme://host/path?parameters"
var deeplink = value.Deeplink;
// separated for convenience
var scheme = value.Scheme;
var host = value.Host;
var path = value.Path;
var queryParametersMap = value.Parameters;
if(queryParametersMap["<your_uri_key>"]?.Contains("<your_uri_key_value>") == true) {
// handle value
}
});

Android deeplinks are handled via an intent-filter declaring android:autoVerify="true" inside AndroidManifest.xml, with a custom scheme (not http/https)..

Test with:

Terminal window
adb shell am start -a android.intent.action.VIEW -d "YOUR_SCHEME://YOUR_DOMAIN/somepath?param=1&list=some&list=other&list="

Test command references:.

Android App Links use an intent-filter with https / http schemes plus a Digital Asset Links file (/.well-known/assetlinks.json) hosted at your domain..

Public API:

  • public static void GetDeferredDeeplink(OnReferrerCallback callback)Runtime/Affise.cs:238
  • public static void GetDeferredDeeplinkValue(ReferrerKey key, OnReferrerCallback callback)Runtime/Affise.cs:250
  • public delegate void OnReferrerCallback(string? value);Runtime/Referrer/OnReferrerCallback.cs:4

Example:

Affise.GetDeferredDeeplink(deferredDeeplink => {
// handle deferred deeplink
});

Example for value retrieval (Runtime/Affise.cs:250):

Affise.GetDeferredDeeplinkValue(ReferrerKey.CLICK_ID, deferredDeeplinkValue => {
// handle deferred deeplink value
});

See Referrer for the full ReferrerKey enumeration.