我想为我的应用找到引荐,但显示未设置
我可以在调试版本中使用我的代码在android-studio上找到引荐,但不能通过Play商店
public void onInstallReferrerSetupFinished(int responseCode) {
switch (responseCode) {
case InstallReferrerClient.InstallReferrerResponse.OK:
android.util.Log.e("Install refer Connection established");
try {
ReferrerDetails response = referrerClient.getInstallReferrer();
String installReferrer = response.getInstallReferrer();
long clickTimestampSeconds = response.getReferrerClickTimestampSeconds();
long installBeginTimestampSeconds = response.getInstallBeginTimestampSeconds();
if(callback_ != null) {
callback_.onReferralReceived(installReferrer,clickTimestampSeconds,installBeginTimestampSeconds);
}
referrerClient.endConnection();
} catch (Exception e) {
if(callback_ != null) {
callback_.onReferralError("Install refer Details not found");
}
}
break;
case InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED:
if(callback_ != null) {
callback_.onReferralError("Install refer API not available");
}
break;
case InstallReferrerClient.InstallReferrerResponse.SERVICE_UNAVAILABLE:
if(callback_ != null) {
callback_.onReferralError("Install refer Connection not established");
}
break;
}
}
我在链接中的引荐参数格式也很好,即https://play.google.com/store/apps/details?id=com.octro.rummy&referrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26utm_term %3Dtest%26anid%3Dadmob