From edf6214ceab42696a0fe5bb74222aac4c0a93181 Mon Sep 17 00:00:00 2001 From: huyufei Date: Thu, 25 Jul 2024 11:49:32 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BF=AE=E5=A4=8Ddeeplink=20?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyufei --- Runtime/GuruAdjust/AdjustService.cs | 3 +- .../GuruCore/Runtime/Firebase/FirebaseUtil.cs | 30 ++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Runtime/GuruAdjust/AdjustService.cs b/Runtime/GuruAdjust/AdjustService.cs index 32b244c..8cd4012 100644 --- a/Runtime/GuruAdjust/AdjustService.cs +++ b/Runtime/GuruAdjust/AdjustService.cs @@ -50,8 +50,9 @@ namespace Guru /// /// /// MIR 追踪 AppID + /// /// - public static void StartService(string appToken, string fbAppId = "", Action onDeeplinkCallback = null) + public static void StartService(string appToken, string fbAppId = "", Action onSessionSuccess = null, Action onDeeplinkCallback = null) { if (string.IsNullOrEmpty(appToken)) { diff --git a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs index 11ab9a2..636d716 100644 --- a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs +++ b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs @@ -121,24 +121,26 @@ namespace Guru { ReportAdjustId(IPMConfig.ADJUST_ID); // 二次启动后,若有值则立即上报属性 } - - AdjustService.StartService(appToken, fbAppId, adjustId => - { - // 获取 ADID - if (string.IsNullOrEmpty(adjustId)) - { - adjustId = "not_set"; - } - else - { - IPMConfig.ADJUST_ID = adjustId; - } - ReportAdjustId(adjustId); - }); + AdjustService.StartService(appToken, fbAppId, OnGetAdjustId, OnAdjustDeeplinkCallback); + }); } + private static void OnGetAdjustId(string adjustId) + { + // 获取 ADID + if (string.IsNullOrEmpty(adjustId)) + { + adjustId = "not_set"; + } + else + { + IPMConfig.ADJUST_ID = adjustId; + } + ReportAdjustId(adjustId); + } + private static void ReportAdjustId(string adjustId) {