问题描述
我已经实现了Play Install Referrer API,以便每当我的android应用程序以某个URL开头时,就会从android应用程序的URL中检索一些引荐来源网址数据。
我已经在PHP Web端实现了重定向URL方案,并在我的android应用清单中指定了服务器的URL架构。但仍然没有成功,而不是方法 getinstallreferrer()的URL参数,我却得到了 utm_source = google-play&utm_medium = organic
我的Web URL是-https://example.com/deeplink/index/shashwat
我的重定向URL是-https://play.google.com/store/apps/details?id=MyPackageName&hl=en&referrer=shashwat
但是我无法在我的应用程序中获得此shshwat值
在清单中
<activity
android:name=".UI.Activity_Splash"
android:screenorientation="portrait">
<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:host="example.com"
android:pathPrefix="/deeplink/index"
android:scheme="https" />
</intent-filter>
</activity>
在活动中,我正在抓取
referrerClient = installreferrerClient.newBuilder(this).build();
referrerClient.startConnection(new installreferrerStateListener() {
@Override
public void oninstallreferrerSetupFinished(int responseCode) {
String response = "";
switch (responseCode) {
case installreferrerClient.installreferrerResponse.OK:
// Connection established.
ReferrerDetails referral_response = null;
try {
referral_response = referrerClient.getinstallreferrer();
} catch (remoteexception e) {
e.printstacktrace();
}
response = referral_response.getinstallreferrer();
break;
case installreferrerClient.installreferrerResponse.FEATURE_NOT_SUPPORTED:
// API not available on the current Play Store app.
Toast.makeText(Activity_Splash.this,"App Not Available On Play Store",Toast.LENGTH_LONG).show();
break;
case installreferrerClient.installreferrerResponse.SERVICE_UNAVAILABLE:
// Connection Couldn't be established.
Toast.makeText(Activity_Splash.this,"Connection Couldn't Be Established",Toast.LENGTH_LONG).show();
break;
}
}
@Override
public void oninstallreferrerServicedisconnected() {
}
});
如果有人知道此问题,请告诉我
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)