我想实现 Play Install Referrer API,我找到了文档并阅读了该文档,但我有些困惑。首先我实现了谷歌提供的所有代码。但我想知道我需要创建哪种类型的 url,以便用户可以单击链接并去玩商店并安装我的应用程序,然后我得到推荐详细信息..
我使用这段代码:
InstallReferrerClient mReferrerClient;
mReferrerClient = newBuilder(this).build();
mReferrerClient.startConnection(this);
@Override
public void onInstallReferrerSetupFinished ( int responseCode){
switch (responseCode) {
case InstallReferrerClient.InstallReferrerResponse.OK:
// Connection established
/* ReferrerDetails response = null;
try {
response = mReferrerClient.getInstallReferrer();
response.getInstallReferrer();
response.getReferrerClickTimestampSeconds();
response.getInstallBeginTimestampSeconds();
} catch (RemoteException e) {
e.printStackTrace();
}*/
break;
case InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED:
// API not available on the current Play Store app
break;
case InstallReferrerClient.InstallReferrerResponse.SERVICE_UNAVAILABLE:
// Connection could not be established
break;
}
}
@Override
public void onInstallReferrerServiceDisconnected () {
}
但是我创建了哪种类型的链接,所以用户去播放商店,安装播放商店推荐 api 后给我数据..