使用 Password AutoFill 功能时,存储的密码域名可能会向 App 用户显示为 airbridge.io 或 abr.ge。
在 Airbridge SDK 设置深度链接后,如果使用 Password AutoFill 功能,密码域名将被存储为 Airbridge 深度链接的 App Link 域名,即 airbridge.io 或 abr.ge。
可通过设置 Password AutoFill 使用的 Webcredentials 域名来解决该问题:
1. 请准备用于存储密码的域名(YOUR_DOMAIN
)。
2. 请将以下 JSON 托管至 https://YOUR_DOMAIN/.well-known/apple-app-site-association
,并确保 Content-Type: application/json
。
App ID Prefix 和 Bundle ID 可在 Apple Developer 的 [Identifiers]>[YOUR_APP] 获取。
{
"webcredentials": {
"apps": ["YOUR_APP_ID_PREFIX.YOUR_BUNDLE_ID"]
}
}
3. 请在 Xcode 导航至 [YOUR_PROJECT]>[Signing & Capabilities]。
4. 请点击 “+ Capability” 以添加 Associated Domains。请将 webcredentials:YOUR_DOMAIN
输入至 Associated Domains。
在构建时,会出现 Dependencies coroutines 错误,并显示以下消息:
java.lang.NoClassDefFoundError: kotlin/coroutines/AbstractCoroutineContextKey
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
...
如果 kotlinx-coroutines-core 库的版本为 v1.3.5 或以上,则 kotlin-stdlib 库的版本必须满足一定的最低要求。
请使用 gradlew dependencies
命令检查 kotlin-stdlib 库的版本是否为 v1.3.70 或以上。如果版本低于该要求,请进行更新。
使用 Braze SDK 发送的推送通知触发的深度链接打开(Deeplink Open)事件未被收集,而是收集到打开(Open)事件。
Airbridge Android SDK 通过 activity 的 action 中的 dataString 和 intent 的 dataString 区分深度链接打开事件和打开事件。
当使用 Braze SDK 发送的推送通知打开 App 时,会使用 NotificationTrampolineActivity
。由于无法从 NotificationTrampolineActivity
的 activity 的 action 和 intent 中获取 dataString,因此 Airbridge Android SDK 无法正确区分深度链接打开事件和打开事件。
请按以下方式添加自定义 Application class(CustomApplication.java
)文件:
package com.company.product;
import android.app.Activity;
import com.epicgames.ue4.GameApplication;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.NotNull;
import co.ab180.airbridge.AirbridgeLifecycleIntegration;
import co.ab180.airbridge.ue.AirbridgeUnreal;
public class CustomApplication extends GameApplication {
@Override
public void onCreate() {
super.onCreate();
AirbridgeUnreal.setLifecycleIntegration(new AirbridgeLifecycleIntegration() {
@Nullable
@Override
public String getDataString(@NotNull Activity activity) {
if (activity.getClass().getName().equals("com.braze.push.NotificationTrampolineActivity")
&& activity.getIntent() != null
&& activity.getIntent().getExtras() != null
) {
return activity.getIntent().getExtras().getString("uri");
}
return null;
}
});
}
}
package com.company.product;
import android.app.Activity;
import com.epicgames.unreal.GameApplication;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.NotNull;
import co.ab180.airbridge.AirbridgeLifecycleIntegration;
import co.ab180.airbridge.ue.AirbridgeUnreal;
public class CustomApplication extends GameApplication {
@Override
public void onCreate() {
super.onCreate();
AirbridgeUnreal.setLifecycleIntegration(new AirbridgeLifecycleIntegration() {
@Nullable
@Override
public String getDataString(@NotNull Activity activity) {
if (activity.getClass().getName().equals("com.braze.push.NotificationTrampolineActivity")
&& activity.getIntent() != null
&& activity.getIntent().getExtras() != null
) {
return activity.getIntent().getExtras().getString("uri");
}
return null;
}
});
}
}
请使用 Unreal Plugin Language(UPL)在 Android Manifest 文件中添加自定义 Application class,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
<prebuildCopies>
<copyDir src="$S(PluginDir)/..." dst="$S(BuildDir)/src/com/company/product" />
</prebuildCopies>
<androidManifestUpdates>
<addAttribute tag="application" name="android:name" value="com.company.product.CustomApplication"/>
</androidManifestUpdates>
</root>
在构建时,会出现 Manifest merger failed 错误。
Airbridge SDK 的 AndroidManifest.xml
中包含用于禁用共享环境设置数据备份的规则。该规则的目的是防止在重新安装 App 时保留相同的 Airbridge 配置值,以便准确检测新安装或重新安装。
在合并 Airbridge SDK 备份规则 和 App 自身的备份规则时,可能会发生冲突。
Airbridge SDK 定义的禁用备份规则如下:
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
</cloud-backup>
<device-transfer>
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
</device-transfer>
</data-extraction-rules>
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
</full-backup-content>
如果在 AndroidManifest.xml
中添加了 android:fullBackupContent="string"
,可能会出现以下错误:
Manifest merger failed : Attribute application@fullBackupContent value=(string) from AndroidManifest.xml
为了解决该错误,
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Advanced APK Packaging]>[Extra Tags for <manifest> node],添加 xmlns:tools="http://schemas.android.com/tools"
。
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Extra Tags for <application> node],添加 tools:replace="android:fullBackupContent"
。
如果在 AndroidManifest.xml
中添加了 android:dataExtractionRules="string resource"
,可能会出现以下错误:
Manifest merger failed : Attribute application@dataExtractionRules value=(string resource) from AndroidManifest.xml
为了解决该错误,
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Advanced APK Packaging]>[Extra Tags for <manifest> node],添加 xmlns:tools="http://schemas.android.com/tools"
。
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Extra Tags for <application> node],添加 tools:replace="android:dataExtractionRules"
。
如果在 AndroidManifest.xml
中添加了 android:allowBackup="false"
,可能会出现以下错误:
Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:32:9-36
is also present at [:airbridge] AndroidManifest.xml:27:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:30:5-250:19 to override.
为了解决该错误,
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Advanced APK Packaging]>[Extra Tags for <manifest> node],添加 xmlns:tools="http://schemas.android.com/tools"
。
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Extra Tags for <application> node],添加 tools:replace="android:allowBackup"
。
android:dataExtractionRules
功能从 API Level 31 开始支持,因此如果 compileSdkVersion 低于 31,可能会出现以下错误:
AndroidManifest.xml: AAPT: error: attribute android:dataExtractionRules not found.
为了解决该错误,
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Advanced APK Packaging]>[Extra Tags for <manifest> node],添加 xmlns:tools="http://schemas.android.com/tools"
。
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Extra Tags for <application> node],添加 tools:remove="android:dataExtractionRules"
。
请参阅以下指南获取更多信息:
当 Airbridge SDK 备份规则与其他第三方 SDK(例如 AppsFlyer SDK)的备份规则发生重复应用时,可能会出现以下构建错误:
Attribute application@fullBackupContent value=(@xml/appsflyer_backup_rules) from [com.appsflyer:af-android-sdk:6.6.1] AndroidManifest.xml:14:18-73
is also present at [io.airbridge:sdk-android:2.14.0] AndroidManifest.xml:27:18-78 value=(@xml/airbridge_auto_backup_rules).
Suggestion: add 'tools:replace="android:fullBackupContent"' to <application> element at AndroidManifest.xml:7:5-13:19 to override.
由于 Airbridge SDK 备份规则与第三方 SDK 备份规则同时应用,可能会导致构建错误。
请在模块目录内创建文件,例如 custom_backup_rules.xml
。
请添加 Airbridge SDK 定义的数据备份规则,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<!-- Airbridge Backup Rules -->
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
<!-- Appsflyer Backup Rules -->
<exclude domain="sharedpref" path="appsflyer-data"/>
<!-- Your Custom Backup Rules -->
</full-backup-content>
请使用 Unreal Plugin Language(UPL),将该文件复制到 res/xml
文件夹,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
...
<resourceCopies>
<copyFile src="{YOUR_XML_BACKUP_RULES_PATH}" dst="$S(BuildDir)/res/xml/custom_backup_rules.xml" />
...
</resourceCopies>
...
</root>
请在模块目录内创建文件,例如 custom_data_extraction_rule.xml
。
请添加 Airbridge SDK 定义的数据备份规则,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
<!-- Airbridge Backup Rules -->
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
<!-- Appsflyer Backup Rules -->
<exclude domain="sharedpref" path="appsflyer-data"/>
<!-- Your Custom Backup Rules -->
</cloud-backup>
<device-transfer>
<!-- Airbridge Backup Rules -->
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
<!-- Appsflyer Backup Rules -->
<exclude domain="sharedpref" path="appsflyer-data"/>
<!-- Your Custom Backup Rules -->
</device-transfer>
</data-extraction-rules>
请使用 Unreal Plugin Language(UPL),将该文件复制到 res/xml
文件夹,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
...
<resourceCopies>
<copyFile src="{YOUR_XML_BACKUP_RULES_PATH}" dst="$S(BuildDir)/res/xml/custom_data_extraction_rule.xml" />
...
</resourceCopies>
...
</root>
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Advanced APK Packaging]>[Extra Tags for <manifest> node],并添加以下元素:
xmlns:tools="http://schemas.android.com/tools"
请在 Unreal Editor 的 [Project Settings] 窗口,导航至 [Platforms]>[Android]>[Advanced APK Packaging]>[Extra Tags for <manifest> node],并添加以下元素:
android:allowBackup="true"
android:fullBackupContent="@xml/custom_backup_rules"
android:dataExtractionRules="@xml/custom_data_extraction_rules"
tools:replace="android:fullBackupContent, android:dataExtractionRules"
请参阅以下文档获取更多信息:
在 LAT(Limit Ad Tracking,限制广告跟踪)已关闭的的情况下,GAID(Google Advertising ID,Google 广告 ID)应该被正常收集,但实际被收集为 00000000-0000-0000-0000-000000000000。
由于第三方库等的影响,AD_ID 权限被移除,导致 GAID 收集异常。
请添加 AD_ID 权限:
<manifest ...>
...
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
...
</manifest>
Was this page helpful?
package com.company.product;
import android.app.Activity;
import com.epicgames.ue4.GameApplication;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.NotNull;
import co.ab180.airbridge.AirbridgeLifecycleIntegration;
import co.ab180.airbridge.ue.AirbridgeUnreal;
public class CustomApplication extends GameApplication {
@Override
public void onCreate() {
super.onCreate();
AirbridgeUnreal.setLifecycleIntegration(new AirbridgeLifecycleIntegration() {
@Nullable
@Override
public String getDataString(@NotNull Activity activity) {
if (activity.getClass().getName().equals("com.braze.push.NotificationTrampolineActivity")
&& activity.getIntent() != null
&& activity.getIntent().getExtras() != null
) {
return activity.getIntent().getExtras().getString("uri");
}
return null;
}
});
}
}
package com.company.product;
import android.app.Activity;
import com.epicgames.unreal.GameApplication;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.NotNull;
import co.ab180.airbridge.AirbridgeLifecycleIntegration;
import co.ab180.airbridge.ue.AirbridgeUnreal;
public class CustomApplication extends GameApplication {
@Override
public void onCreate() {
super.onCreate();
AirbridgeUnreal.setLifecycleIntegration(new AirbridgeLifecycleIntegration() {
@Nullable
@Override
public String getDataString(@NotNull Activity activity) {
if (activity.getClass().getName().equals("com.braze.push.NotificationTrampolineActivity")
&& activity.getIntent() != null
&& activity.getIntent().getExtras() != null
) {
return activity.getIntent().getExtras().getString("uri");
}
return null;
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
<prebuildCopies>
<copyDir src="$S(PluginDir)/..." dst="$S(BuildDir)/src/com/company/product" />
</prebuildCopies>
<androidManifestUpdates>
<addAttribute tag="application" name="android:name" value="com.company.product.CustomApplication"/>
</androidManifestUpdates>
</root>
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
</cloud-backup>
<device-transfer>
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
</device-transfer>
</data-extraction-rules>
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
</full-backup-content>
Manifest merger failed : Attribute application@fullBackupContent value=(string) from AndroidManifest.xml
Manifest merger failed : Attribute application@dataExtractionRules value=(string resource) from AndroidManifest.xml
Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:32:9-36
is also present at [:airbridge] AndroidManifest.xml:27:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:30:5-250:19 to override.
AndroidManifest.xml: AAPT: error: attribute android:dataExtractionRules not found.
Attribute application@fullBackupContent value=(@xml/appsflyer_backup_rules) from [com.appsflyer:af-android-sdk:6.6.1] AndroidManifest.xml:14:18-73
is also present at [io.airbridge:sdk-android:2.14.0] AndroidManifest.xml:27:18-78 value=(@xml/airbridge_auto_backup_rules).
Suggestion: add 'tools:replace="android:fullBackupContent"' to <application> element at AndroidManifest.xml:7:5-13:19 to override.
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
...
<resourceCopies>
<copyFile src="{YOUR_XML_BACKUP_RULES_PATH}" dst="$S(BuildDir)/res/xml/custom_backup_rules.xml" />
...
</resourceCopies>
...
</root>
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<!-- Airbridge Backup Rules -->
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
<!-- Appsflyer Backup Rules -->
<exclude domain="sharedpref" path="appsflyer-data"/>
<!-- Your Custom Backup Rules -->
</full-backup-content>
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
<!-- Airbridge Backup Rules -->
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
<!-- Appsflyer Backup Rules -->
<exclude domain="sharedpref" path="appsflyer-data"/>
<!-- Your Custom Backup Rules -->
</cloud-backup>
<device-transfer>
<!-- Airbridge Backup Rules -->
<exclude domain="sharedpref" path="airbridge-internal" />
<exclude domain="sharedpref" path="airbridge-install" />
<exclude domain="sharedpref" path="airbridge-user-info" />
<exclude domain="sharedpref" path="airbridge-user-alias" />
<exclude domain="sharedpref" path="airbridge-user-attributes" />
<exclude domain="sharedpref" path="airbridge-device-alias" />
<exclude domain="database" path="airbridge.db" />
<!-- Appsflyer Backup Rules -->
<exclude domain="sharedpref" path="appsflyer-data"/>
<!-- Your Custom Backup Rules -->
</device-transfer>
</data-extraction-rules>
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
...
<resourceCopies>
<copyFile src="{YOUR_XML_BACKUP_RULES_PATH}" dst="$S(BuildDir)/res/xml/custom_data_extraction_rule.xml" />
...
</resourceCopies>
...
</root>
<manifest ...>
...
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
...
</manifest>