Deep Link
Deep links for Android devices and universal links for iOS devices are methods to open specific content in your app.
Set up deep link for Android apps
A deep link is a URI that redirects visitors to content in an app, while web links are deep links that use the HTTP or HTTPS scheme. In Android, deep links can be created by adding an intent-filter
to an activity in your app. As other apps (such as the system browser) installed on a player's device may also be able to handle the same intent, the player can choose to open your deep link with a different app.
For Android 6.0 (API level 23) and later versions, Android App Links can be used to set your app as the default handler of a certain link type, by adding the autoVerify
attribute to web links. The attribute lets the Android system verify whether your app corresponds to the host domain specified in the intent-filter
. However, players can still choose to change the default handler by manually configuring the settings on their device.
For more information, see Handling Android App Links.
Step 1: Configure Player Network SDK
Player Network SDK V1.12.00 or later
In
AndroidManifest.xml
, create anintent-filter
for your URI.Custom scheme link
Configure a deep link:
scheme
- Custom schemehost
- Custom host domainpathPrefix
(optional) - Custom path prefix, see Multi-store packages
Code sample for deep link
lipass://app/xxxxxx
:<activity
android:name=".ExampleActivity"
android:exported="true"
...>
<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:scheme="lipass"
android:host="app" />
</intent-filter>
</activity>HTTP/HTTPS scheme link
Choose to configure either a web link (deep link with the HTTP/HTTPS scheme) or an Android App Link (web link with automatic verification for default app handling):
scheme
- http or httpshost
- Custom host domainpathPrefix
(optional) - Custom path prefix, see Multi-store packages
Code sample for web link
https://www.levelinfinite.com/app/xxxxxx
:<activity
android:name=".ExampleActivity"
android:exported="true"
...>
<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:scheme="http"
android:host="www.levelinfinite.com"
android:pathPrefix="/app" />
<data android:scheme="https"
android:host="www.levelinfinite.com"
android:pathPrefix="/app" />
</intent-filter>
</activity>Code sample for Android App Link
https://www.levelinfinite.com/app/xxxxxx
(supported in Android 6.0 and above):<activity
android:name=".ExampleActivity"
android:exported="true"
...>
<intent-filter android:autoVerify="true"><!-- enable automatic verification -->
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"
android:host="www.levelinfinite.com"
android:pathPrefix="/app" />
<data android:scheme="https"
android:host="www.levelinfinite.com"
android:pathPrefix="/app" />
</intent-filter>
</activity>Code sample:
<activity
android:name=".ExampleActivity"
android:exported="true"
...>
<intent-filter>
<!-- This intent-filter supports the `lipass://app/xxxxxx` deep link -->
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="lipass"
android:host="app" />
</intent-filter>
<intent-filter android:autoVerify="true">
<!-- This intent-filter supports the `https://www.levelinfinite.com/app/xxxxxx` Android App Link -->
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"
android:host="www.levelinfinite.com"
android:pathPrefix="/app" />
<data android:scheme="https"
android:host="www.levelinfinite.com"
android:pathPrefix="/app" />
</intent-filter>
</activity>Receive intent data.
- Unity
- Unreal Engine
Call the
getData()
andgetAction()
methods in theonCreate
andonNewIntent
of theMainActivity
to retrieve the data and actions associated with the incomingIntent
.@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent = getIntent();
String action = intent.getAction();
Uri data = intent.getData();
if (data != null) {
INTLSDK.Deeplink.receive(data.toString());
}
}
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
INTLSDK.onNewIntent(intent);
Uri appLinkData = intent.getData();
if (appLinkData != null) {
INTLSDK.Deeplink.receive(appLinkData.toString());
}
}Call the
getData()
andgetAction()
methods in the correspondingonCreate
andonNewIntent
in the game's XML file to retrieve the data and operations associated with the incomingIntent
.<!--GameActivity.java onCreate code -->
<gameActivityOnCreateAdditions>
<insert>
setFullScreen();
RequestDynamicPermissions();
INTLSDK.initialize(this);
Intent appLinkIntent = getIntent();
String appLinkAction = appLinkIntent.getAction();
Uri appLinkData = appLinkIntent.getData();
android.util.Log.i("deeplink", "appLinkAction = " + appLinkAction + ", appLinkData = " + appLinkData);
if (appLinkData != null) {
INTLSDK.Deeplink.receive(appLinkData.toString());
}
</insert>
</gameActivityOnCreateAdditions>
<!--GameActivity.java OnNewIntent code-->
<gameActivityOnNewIntentAdditions>
<insert>
INTLSDK.onNewIntent(newIntent);
Uri appLinkData = newIntent.getData();
if (appLinkData != null) {
INTLSDK.Deeplink.receive(appLinkData.toString());
}
</insert>
</gameActivityOnNewIntentAdditions>
Step 2: Configure website
This step is only required if Android App Links have been configured, and is optional if your app does not use Android App Links.
To verify that you own both your app and the web domain through Google Search Console, deploy the Digital Asset Links JSON file at the following location:
https://domain.name/.well-known/assetlinks.json
The Digital Asset Links JSON file uses the following fields to identify the associated app:
package_name: The app ID declared in the
build.gradle
file.sha256_cert_fingerprints: The SHA256 fingerprints of your app's signing certificate. This field supports multiple fingerprints, which can support different versions of your app, such as debugging and production builds.
Use the following command to generate the fingerprints via the Java keytool:
$ keytool -list -v -keystore my-release-key.keystore
The sample assetlinks.json
below grants permissions for android_app
to open com.example
links:
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.example",
"sha256_cert_fingerprints":
["14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"]
}
}]
[Optional] Multi-store packages
For channel packages with different package names, the android:pathPrefix
attribute can be used to distinguish them. For example, if android:pathPrefix="/sample"
is added to channel A, if both channel A and channel B packages are installed, the http://sdk-deeplink-confs.intlgame.com/sample
link will pull up channel A.
Example of JSON file configurations for multi-store packages:
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.example.puppies.app",
"sha256_cert_fingerprints":
["14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"]
}
},
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.example.monkeys.app",
"sha256_cert_fingerprints":
["14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8: 8A:04:96:B2:3F:CF:44:E5"]
}
}]
Step 3: Test your deep links
Due to the limitations with its built-in browser, players cannot be redirected to another app by opening a link in WeChat.
After installing the app, open the test link from the Android text editor app:
When a link is clicked in an Android text editor app (such as Notepad), the log will record
[ (intl_deeplink_manager.cpp:37) Receive]
.The general syntax for using adb to test an intent-filter URL is:
$ adb shell am start
-W -a android.intent.action.VIEW
-d "URL" PACKAGEFor example, the following command attempts to view the target app activity for
lipass://app/xxxxxx
.$ adb shell am start
-W -a android.intent.action.VIEW
-d "lipass://app/xxxxxx" com.example.android_app
When a web URI is invoked, the Android system will attempt each operation in the following order until the request is successful:
- If the default handler for the link type has been specified, open the app.
- Open the only app that can handle the link type.
- Allow the player to select the app to be opened from the disambiguation dialog.
Set up universal link for iOS apps
Universal link is a mechanism for redirection between web and app interfaces introduced on Apple devices with iOS 9 and above. With universal links, users can open an app link in Safari or WebView to automatically open the relevant app while keeping all parameter data. Universal link solves several problems with the URL Scheme:
- When redirect fails, links are opened in Safari or WebView.
- Universal links provides unified web and native routing.
- Redirects do not open popup prompts, improving the user experience.
Player Network SDK for iOS platform only handles deep links in universal links. For the OpenUrl method where AppDelegate
is opened through a custom scheme, Player Network SDK will not handle the method nor return the deep link callback, the game will have to handle this on their own.
Step 1: Configure web server
Configure JSON file apple-app-site-association
and add it in the root directory of your web server. Universal links do not require deployment in the official website domain. Just ensure the deployment location is in a high-level directory that can be accessed. If deploying it on the official website, refer to the configuration example below or see Supporting associated domains.
The required configuration for deploying universal links on the official website:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "9JA89QQLNQ.com.apple.wwdc",
"paths": [ "/wwdc/news/", "/videos/wwdc/2015/*"]
},
{
"appID": "ABCD1234.com.apple.wwdc",
"paths": [ "*" ]
}
]
}
}
- The
apps
key must be an empty array - The
details
key corresponds to a dictionary. Website supports one dictionary per app, The order of the dictionaries in the array determines the order the system follows when looking for a match. Therefore, it is able to designate an app to handle specific parts of the website. - Each dictionary contains one
appID
key and onepaths
key:appID
is the team ID or app ID prefix followed by the bundle ID.paths
is a string array to specify the website paths supported by the app and the website paths not associated with the app. When specifying the section not to be associated with the universal link, add"NOT"
(including the space)to the start of the path string, for example,"paths": [ "/wwdc/news/", "NOT/videos/wwdc/2010/*", "/videos/wwdc/201?/*"]
. As the systempaths
evaluates each path in the array in the specified order, and stops evaluating when a positive or negative match is found, specify high-priority paths before low-priority paths.
For re-signed apps, the appID
and paths
keys of the re-signed certificate must also be configured here.
To specify website paths(paths
)in apple-app-site-association
:
- Use
*
to indicate the entire site. - Use a specified URL to indicate a specified link, such as
/wwdc/news/
. - Use
*
to indicate any string, and add*
to specified URL to indicate a section of the website, such as/videos/wwdc/2015/*
. - Use
?
to match any character, and combine both wildcard characters (*
and?
) in one URL, such as/foo/*/bar/201?/mypage
.
Strings specifying website paths in the paths
array must be case-sensitive.
Step 2: Configure associated domains
To enable the Associated Domains capability, contact your capability manager to apply for the relevant permissions. For more information, see Supporting associated domains.
After enabling the Associated Domains capability, generate a new signed configuration profile.
Configure Xcode capabilities. From Signing & Capabilities in the Xcode project, enable Associated Domains and add your Domains according to the format
applinks:your_link
.noteThe Domains configuration does not require
https://
.
Games can also add and enable Associated Domains automatically by using the below code.
- Unity
- Unreal Engine
Add the following code in PostProcess:
#if UNITY_2019_3_OR_NEWER
var capManager = new UnityEditor.iOS.Xcode.ProjectCapabilityManager(projPath, entitlementsFilePath, targetGuid: targetProjectName);
#else
var capManager = new UnityEditor.iOS.Xcode.ProjectCapabilityManager(projPath, entitlementsFilePath, targetProjectName);
#endif
capManager.AddAssociatedDomains(new string[] { "your_link1", "your_link2", "your_link3" });
Add
Entitlement
to UE4 by modifying the below file in the Unreal Engine directory:/Your_UE_Installation_Path/Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSExports.cs
noteThis method is used to set one or more universal link domains. Consider using array format to get links and write them to the corresponding locations. After configuring settings, users must run
UnrealBuildTool.sln
again and generate a new solution. Users can modifyAssociatedDomains
,bEnableAssociatedDomains
, and other parameter names as needed.// for AssociatedDomains with Apple
bool bEnableAssociatedDomains = false;
string domainsListString = null;
PlatformGameConfig.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "AssociatedDomains", out domainsListString);
PlatformGameConfig.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bEnableAssociatedDomains", out bEnableAssociatedDomains);
if(bEnableAssociatedDomains && domainsListString.Length > 0){
Text.AppendLine("\t<key>com.apple.developer.associated-domains</key>");
Text.AppendLine("\t<array>");
string[] domainList = domainsListString.Split(',');
for(int i = 0;i<domainList.Count();i++)
{
Text.AppendLine(string.Format("<string>{0}</string>", domainList[i]));
}
Text.AppendLine("\t</array>");
}In
DefaultEngine.ini
, find/Script/IOSRuntimeSettings.IOSRuntimeSettings
and add the below configurations:bEnableAssociatedDomains=True
AssociatedDomains=your_link1,your_link2,your_link3
Step 3: Configure Player Network SDK
Player Network SDK V1.12.00 or later
- Unity
- Unreal Engine
As the INTLCore is not currently effective for the hook of this entry method, add the iOS lifecycle entry function in the UnityAppController
class of Unity's UnityAppController.mm
file.
The XCodePostProcess.cs
code has automatically added the application:continueUserActivity:restorationHandler
method in the compiled process flow (users do not need to add additional code in the function).
Do not add the lifecycle entry function in a UnityAppController
sub-class and ensure that the function is in the same class as application:openURL:options:
and other system lifecycle functions.
- (BOOL)application:(UIApplication *)application continueUserActivity:
(NSUserActivity *)userActivity restorationHandler:(void(^)
(NSArray<id<UIUserActivityRestoring>> *
__nullablerestorableObjects))restorationHandler {
return YES;
}
Implement an iOSAppDelegate category in iOS and place it in the INTLSDK/Source/INTLCore/Private/iOS
plugin.
This solution uses the iOS category for implementation, but there is a risk it will be replaced by another SDK, so the game must verify that the URL is valid.
Create an IOSAppDelegate+INTL.mm
file with the following content:
# define WITH_INTLSDK 1
# if WITH_INTLSDK
# ifdef __APPLE__
# import <Foundation>
# import "IOSAppDelegate.h"//UE4
# include "CoreDelegates.h"//UE4
# include "INTLApplicationDelegate.h"
@interface IOSAppDelegate(INTLSDK)
@end
@implementation IOSAppDelegate(INTLSDK)
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler
{
NSLog(@"IOSAppDelegate(INTLSDK) continueUserActivity ");
return [[INTLApplicationDelegate sharedInstance] application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
}
@end
# endif
# endif
Step 4: Test your universal links
Due to the limitations with its built-in browser, players cannot be redirected to another app by opening a link in WeChat.
When the URL associated with your app is clicked in the iOS Notes app, a redirect to your app will be triggered and the following log will be recorded:
INTLApplicationDelegate:continueUserActivity:restorationHandler
Sample logs:
When an app is opened for the first time after an installation or update, the system will request the apple-app-site-association
file from the corresponding domain. If the universal link is not accessible but the configuration is correct, try restarting the device or reinstalling the app.
After apple-app-site-association
and the Xcode project of the app is set up, the entire universal link operation process is controlled by the system. According to prediction, the following scenarios will occur the first time the app is opened after an installation or update:
- App initiates a
GET
request to get theapple-app-site-association
file from the domain configured in the project. - App registers
apple-app-site-association
with the system. - When an URL is opened in WebView, it will be checked against the registered
apple-app-site-association
URLs. - If there is a match, system opens the app and triggers the universal link delegate.
- If there is no match, system continues to open the URL in WebView.
Set up AppsFlyer OneLink for your app
AppsFlyer supports the following deep linking functions provided by AppsFlyer SDK:
Deep linking: Deep linking happens when the target app is already installed. The configured deep link sends users to specific in-app locations or to complete specific in-app activities.
Deferred deep linking: Deferred deep linking happens when the target app is not installed. The configured deep link sends users to the download page of the target app in a specific app store. When the user installs and opens the app, deferred deep linking sends the user to the target in-app location or completes target in-app activities.
A feature unique to AppsFlyer, AppsFlyer OneLink refers to attribution links that function across platforms, supports forwarding a user to the target app from various source platforms (such as email, social media, web, QR code, etc.), in the process also relaying the ID of the user. The operations team is required to confirm if the ID returned is the OpenID or the device ID,then use the resulting user IDs in a final data analysis to attribute the relevant channels to the invited users.
Step 1: Create an app on the AppsFlyer console
Create your app according to the AppsFlyer documentation Add App.
Step 2: Configure OneLink
If you are new to OneLink Management, follow the user guide for new users to create a OneLink template. For more information, see OneLink templates
Go to AppsFlyer OneLink Management.
On the top-right corner, click the menu icon then select New OneLink Template, and record the template ID.
On the OneLink setup page, enter the template name, subdomain, and select the app that was created previously.
Record the subdomain you entered.For Android apps, in the When app is installed section, click Use App Links to launch the app to add SHA-256 into keystore. For more information, see Android initial setup.
Record down the
intent-filter
code generated by the AppsFlyer console.Save the OneLink template.
Step 3: Configure Player Network SDK
Android
Add the following code to
INTLConfig.ini
under the[AppsFlyer]
node and replace{OneLink_Template_ID}
with the template ID recorded in Step 2.APPSFLYER_APP_INVITE_ONELINK_ID_ANDROID = {OneLink_Template_ID}
If
[Android LifeCycle]
inINTLConfig.ini
does not contain AppsFlyer, add AppsFlyer.LIFECYCLE = WeChat,QQ,Twitter,Adjust,Facebook,Google,Line,VK,Garena,Discord,Dmm,Update,Firebase,KaKao,WhatsApp,Permission,GooglePGS,AppsFlyer
In
AndroidManifest.xml
, add the Androidintent-filter
code recorded from Step 2 under theMainActivity
node of the game.
This code will be used to launch the game, replace{Subdomain}
and{OneLink_Template_ID}
accordingly.<activity
android:name="com.intlgame.unity.MainActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask">
<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" />
<data
android:host="{Subdomain}.onelink.me"
android:pathPrefix="/{OneLink_Template_ID}"
android:scheme="https" />
</intent-filter>
</activity>
iOS
- Unity
- Unreal Engine
Add the following code to
INTLConfig.ini
under the[AppsFlyer]
node and replace{OneLink_Template_ID}
with the template ID recorded in Step 2.APPSFLYER_APP_INVITE_ONELINK_ID_IOS = {OneLink_Template_ID}
In
Assets\INTLSDK\Editor\XUPorter\XCodePostProcess.cs
, add the subdomain (for exampleappslinks:subdomain.onelink.me
) obtained from Step 2 to the below line.capManager.AddAssociatedDomains(new string[] { "appslinks:subdomain.onelink.me"});
Add the following code to
INTLConfig.ini
under the[AppsFlyer]
node and replace{OneLink_Template_ID}
with the template ID recorded in Step 2.APPSFLYER_APP_INVITE_ONELINK_ID_IOS = {OneLink_Template_ID}
In
Config\DefaultEngine.ini
, add the subdomain (for exampleappslinks:subdomain.onelink.me
) obtained from Step 2 to theAssociatedDomains
list.AssociatedDomains=appslinks:subdomain.onelink.me
For more information, see OneLink links and experiences.
Step 4: Call the OneLink API
Set the callback for generating OneLink.
- Unity
- Unreal Engine
INTLAPI.AddExtendResultObserver(OnExtendEvent);// Setting callbacks
INTLExtend.Invoke("AppsFlyer", "generateInviteLinkUrl", paramsJsonString);// paramsJsonString is the information to be relayed to OneLink
public void OnExtendEvent(INTLExtendResult extendResult)
{
if ("generateInviteLinkUrl".Equals(extendResult.ExtendMethodName))// Methods to generate OneLink
{
if (extendResult.RetCode == 0)// OneLink generation success
{
string inviteUrl = extendResult.RetMsg;// The generated OneLink, which can be shared with other players
//TODO:share link to other players
}
else// Failed to generate OneLink
{
//TODO: handle OneLink Failed result
}
}
}- The callback class inherits the
IINTLPluginObserver
class - The callback class implements the methods of the
IINTLPluginObserver
class when needed
FINTLExtendEvent extendEvent;
extendEvent.AddUObject(this, &UFriendWindow::OnExtendResult_Implementation);
UINTLSDKAPI::ExtendInvoke(EINTLLoginChannel::kChannelAppsFlyer,TEXT("generateInviteLinkUrl"), paramsJsonString);// paramsJsonString is the information to be relayed to OneLink
void UFriendWindow::OnExtendResult_Implementation(FINTLExtendResult ret) {
if (ret.ExtendMethodName.Equals(TEXT("generateInviteLinkUrl")))
{
if (ret.RetCode == 0)// OneLink generation success
{
FString inviteURL = ret.RetMsg;// The generated OneLink, which can be shared with other players
//TODO:share link to other players
}
}
}Set the result callback after the invited user clicks on the generated OneLink.
- Unity
- Unreal Engine
Generating OneLink and clicking OneLink events share a single callback, distinguished by the parameter
INTLExtendResult
in the callback.INTLAPI.AddExtendResultObserver(OnExtendEvent);// Setting callbacks
public void OnExtendEvent(INTLExtendResult extendResult)
{
if ("OnOneLinkResult".Equals(extendResult.ExtendMethodName))// OneLink click callback
{
if (extendResult.RetCode == 0)// OneLink click callback success
{
string jsonParameter = extendResult.ExtraJson;// Parameters returned by AF after clicking on OneLink
//TODO:Handle OneLink Parameter
}
else// OneLink Click callback failed
{
//TODO: handle OneLink Failed result
}
}
}FINTLExtendEvent extendEvent;
extendEvent.AddUObject(this, &UFriendWindow::OnExtendResult_Implementation);
void UFriendWindow::OnExtendResult_Implementation(FINTLExtendResult ret) {
if (ret.ExtendMethodName.Equals(TEXT("OnOneLinkResult")))// OneLink click callback
{
if (ret.RetCode == 0)// OneLink click callback success
{
FString jsonParameter = ret.ExtraJson;// Parameters returned by AF after clicking on OneLink
//TODO:Handle OneLink Parameter
}
else// OneLink click callback failed
{
//TODO: handle OneLink Failed result
}
}
}Refer to the following code to generate OneLink, and replace the parameters within the code accordingly.
- Unity
- Unreal Engine
StringBuilder sb = new StringBuilder();
sb.Append("{");
sb.Append("\"deep_link_value\":\"abc\"").Append(","); //<TARGET_VIEW>
sb.Append("\"deep_link_sub1\":\"1234\"").Append(",");//<PROMO_CODE>
sb.Append("\"deep_link_sub2\":\"1234\"").Append(",");//<REFERRER_ID(openid)>
sb.Append("\"channel\":\"mobile_share\"").Append(",");//Channel
sb.Append("\"campaign\":\"summer_sale\"");//Campaign
// Other parameters, optional
sb.Append("\"deep_link_sub3\":\"1234\"").Append(",");
sb.Append("\"deep_link_sub4\":\"1234\"").Append(",");
sb.Append("\"deep_link_sub5\":\"1234\"").Append(",");
sb.Append("\"deep_link_sub6\":\"1234\"").Append(",");
sb.Append("\"deep_link_sub7\":\"1234\"").Append(",");
sb.Append("\"deep_link_sub8\":\"1234\"").Append(",");
sb.Append("\"af_sub4\":\"12324\"").Append(",");
sb.Append("\"af_sub5\":\"dfasdf\"").Append(",");
sb.Append("}");
String paramsJsonString = sb.ToString();
INTLExtend.Invoke("AppsFlyer", "generateInviteLinkUrl", paramsJsonString);FString ParamsJsonString = TEXT("");
const TSharedRef<TJsonWriter<>> JsonWriter = TJsonWriterFactory<>::Create(&ParamsJsonString);
JsonWriter->WriteObjectStart();
JsonWriter->WriteValue(TEXT("deep_link_value"),TEXT("abc"));
JsonWriter->WriteValue(TEXT("deep_link_sub1"),TEXT("1234"));
JsonWriter->WriteValue(TEXT("deep_link_sub2"),TEXT("1234"));
JsonWriter->WriteValue(TEXT(""),TEXT("1234"));
JsonWriter->WriteValue(TEXT(""),TEXT("1234"));
JsonWriter->WriteValue(TEXT("deep_link_sub3"),TEXT("1234"));
JsonWriter->WriteValue(TEXT("deep_link_sub4"),TEXT("1234"));
JsonWriter->WriteValue(TEXT("deep_link_sub5"),TEXT("1234"));
JsonWriter->WriteValue(TEXT("deep_link_sub6"),TEXT("1234"));
JsonWriter->WriteValue(TEXT("deep_link_sub7"),TEXT("1234"));
JsonWriter->WriteValue(TEXT("deep_link_sub8"),TEXT("1234"));
JsonWriter->WriteValue(TEXT("af_sub4"),TEXT("1234"));
JsonWriter->WriteValue(TEXT("af_sub5"),TEXT("dfasdf"));
JsonWriter->WriteObjectEnd();
JsonWriter->Close();
UINTLSDKAPI::ExtendInvoke(EINTLLoginChannel::kChannelAppsFlyer,TEXT("generateInviteLinkUrl"),
Step 5: Test your OneLink integration
Go to the AppsFlyer console.
In the left sidebar, click SDK Integration Tests.
Select the app to test and click Run test.
On the Run non-organic install test page, select the test device and select Other.
Scan the QR code and install the app.
To test the activation again, delete the app and restart the test.
Reference Docs
AppsFlyer deep linking and OneLink: Deep linking
Client API
Deep link observer
Deep link observer handles the callback functions related to deep link data. For more information, see:
- Unity
- Unreal Engine
API | Function |
---|---|
SetDeepLinkObserver | Sets the deep link callback, which notifies the game when data reaches the engine layer. When this callback is received, call the Fetch function to obtain the data. |
RemoveDeepLinkObserver | Removes the deep link callback |
API | Function |
---|---|
SetDeepLinkObserver | Sets the BaseResult callback for the Player Network SDK deep link module. It will notifies the game when data reaches the engine layer. When this callback is received, call the Fetch function to obtain the data. |
GetDeepLinkObserver | Gets the BaseResult callback. |
OnDeepLinkResult_Implementation | Implements the BaseResult callbacks for Player Network SDK deep link. |
Fetch
Fetch
method returns the deep link data in the SDK cache. For more information, see: