2

私は Google Licensing サービスを使用する Android アプリを持っています。新規ユーザーの約 5% から定期的に、ライセンス チェックに失敗したというメールが届きます。それは私の売り上げに影響を与え始めています。私は一体何を間違っているのですか?

this.licenseCheckerCallback = new MyLicenseCheckerCallback();

String deviceId = Secure.getString(getContentResolver(), Secure.ANDROID_ID);

// Construct the LicenseChecker with a Policy.
this.licenseChecker = new LicenseChecker(
    this, new ServerManagedPolicy(this,
            new AESObfuscator(SALT, getPackageName(), deviceId)), 
            BASE64_PUBLIC_KEY  // Your public licensing key.
    );

this.checkLicense();




private void checkLicense() {
    this.licenseChecker.checkAccess(this.licenseCheckerCallback);
}


private class MyLicenseCheckerCallback implements LicenseCheckerCallback {

    public void allow() {
        // Don't do anything, let the user work in peace.
    }

    public void dontAllow() {
        if (isFinishing()) {
            // Don't update UI if Activity is finishing.
            return;
        }
        // Should not allow access. In most cases, the app should assume
        // the user has access unless it encounters this. If it does,
        // the app should inform the user of their unlicensed ways
        // and then either shut down the app or limit the user to a
        // restricted set of features.
        // In this example, we show a dialog that takes the user to Market.
        showDialog(DIALOG_NO_LICENSE_ID);
        MyActivity.this.dialogIdCurrentlyShown = DIALOG_NO_LICENSE_ID;
    }

    public void applicationError(ApplicationErrorCode errorCode) {
        if (isFinishing()) {
            // Don't update UI if Activity is finishing.
            return;
        }
        // This is a polite way of saying the developer made a mistake
        // while setting up or calling the license checker library.
        // Please examine the error code and fix the error.
        MyActivity.this.applicationErrorMessageForDialog = String.format(getString(R.string.application_error), errorCode);
        showDialog(DIALOG_APPLICATION_ERROR_ID);
        MyActivity.this.dialogIdCurrentlyShown = DIALOG_APPLICATION_ERROR_ID;
    }
}
4

1 に答える 1

2

あなたは何も悪いことをしていません。私は同じ問題を抱えており、他の人も同じ問題を抱えています。できることはあまりありませんが、それでも:

  1. Google にサポート チケットを開いて、LVL のパフォーマンスが最適ではなく、正当なユーザーに影響を与えていることを伝えます。
  2. 「ライセンスがありません」ダイアログに「再試行」ボタンを追加します。場合によっては、一時的なネットワーク障害が原因でライセンス エラーが発生することがあります。
  3. ダイアログに Google のサポート メールを残すか、ユーザーが問題をソースに伝えるための他の手段を追加することを検討してください。
  4. そしておそらく唯一の効果的なオプションはGT、応答が永続的な購入に対するものである場合、キャッシュに保存する前に、ライセンス サービスから受信したタイムスタンプの値を手動で増やすことです。GTタイムスタンプとタイムスタンプの違いを確認します。VT十分な長さ (1 週間) の場合は、さらに 1 か月または 1 年を に追加しGTます。ユーザーが払い戻し期間を過ぎると、ユーザーのライセンスをデバイス上で半永久的または完全に永久的にすることができます。

お役に立てれば。

于 2011-11-09T03:46:11.383 に答える