Есть ли способ протестировать новый API Google Referer API, не публикуя приложение в магазине Google Play? - PullRequest
0 голосов
/ 10 октября 2018

Недавно Google выпустил Google Play Install Referrer API (объявление).

В этом вопросе есть различные дубликаты, но нет ясности относительно него.

нужен точный способ тестирования этого кода перед публикацией.

InstallReferrerClient mReferrerClient

mReferrerClient = InstallReferrerClient.newBuilder(this).build();
mReferrerClient.startConnection(new InstallReferrerStateListener() {
    @Override
    public void onInstallReferrerSetupFinished(int responseCode) {
        switch (responseCode) {
            case InstallReferrerResponse.OK:
                // Connection established
                break;
            case InstallReferrerResponse.FEATURE_NOT_SUPPORTED:
                // API not available on the current Play Store app
                break;
            case InstallReferrerResponse.SERVICE_UNAVAILABLE:
                // Connection could not be established
                break;
        }
    }

    @Override
    public void onInstallReferrerServiceDisconnected() {
        // Try to restart the connection on the next request to
        // Google Play by calling the startConnection() method.
    }
});
...