[英]Facebook ads deferred deep linking not working in android App Link Data is null always
我為廣告集成了 Facebook 延遲深層鏈接,對於新安裝應用鏈接數據始終為空
清單文件更改完成。
<activity
android:name="com.disha.quickride.androidapp.startup.QRSplashActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/ActivityTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<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="quickride" />
</intent-filter>
</activity>
啟動器活動中的代碼更改:
AppLinkData.fetchDeferredAppLinkData(this,"XXXXXXXXXXXXX", new AppLinkData.CompletionHandler() {
@Override
public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {
try{
Uri uri = appLinkData.getTargetUri();
Log.d(LOG_TAG,"fetchDeferredAppLinkData URi :" +uri);
Bundle argumentBundle = appLinkData.getArgumentBundle();
Log.d(LOG_TAG,"fetchDeferredAppLinkData argument bundle :" +argumentBundle);
String ref = appLinkData.getRef();
Log.d(LOG_TAG,"fetchDeferredAppLinkData ref :" +ref);
Bundle bundle = appLinkData.getRefererData();
Log.d(LOG_TAG,"fetchDeferredAppLinkData RefererData : " +bundle);
}catch (Throwable throwable){
Log.e(LOG_TAG,"failed to parse",throwable);
}
}
});
try{
Uri uri = getIntent().getData();
Log.d(LOG_TAG,"fetchDeferredAppLinkDataFromIntent URi :" +uri);
Uri targetUrl =
AppLinks.getTargetUrlFromInboundIntent(this, getIntent());
if (targetUrl != null) {
Log.d(LOG_TAG, "App Link Target URL: " + targetUrl.toString());
}else{
Log.d(LOG_TAG, "App Link Target URL: " + targetUrl);
}
}catch (Throwable throwable){
Log.e(LOG_TAG,"failed to parse",throwable);
}
嘗試從 facebook 廣告輪播安裝應用程序,延遲深層鏈接為 quickride://utm_source=facebook
但是這些 url 和鏈接數據總是發布為 null,
用例是在安裝和首次啟動的應用程序的延遲深層鏈接中獲取 utm 參數設置,並解析這些參數並保存到數據庫中。
請檢查方法和解決方案的幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.