15

I am trying to use the APK Expansion Files extension for Android. I have uploaded the APK to the server along with the extension files. If the application was previously published i get a response from the server saying NOT_LICENSED: The code I use is:

APKExpansionPolicy aep = new APKExpansionPolicy(mContext,
                new AESObfuscator(getSALT(), mContext.getPackageName(), deviceId));
aep.resetPolicy();
LicenseChecker checker = new LicenseChecker(mContext, aep,
                getPublicKey();
checker.checkAccess(new LicenseCheckerCallback() {   
            @Override
            public void allow(int reason) { 
            @Override
            public void dontAllow(int reason) {
                try
                {
                    switch (reason) {
                        case Policy.NOT_LICENSED:
mNotification.onDownloadStateChanged(IDownloaderClient.STATE_FAILED_UNLICENSED);
                            break;
                        case Policy.RETRY:
mNotification.onDownloadStateChanged(IDownloaderClient.STATE_FAILED_FETCHING_URL);
                            break;
                    }
                } finally {
                    setServiceRunning(false);
                }
            }
            @Override
            public void applicationError(int errorCode) {
                try {
mNotification.onDownloadStateChanged(IDownloaderClient.STATE_FAILED_FETCHING_URL);
                } finally {
                    setServiceRunning(false);
                }
            }
        });

So if the application wasn't previously published the Allow method is called. If the application was previously published and now it isn't the dontAllow method is called.

I have tried:

  1. http://developer.android.com/guide/google/play/licensing/setting-up.html#test-response Here it says that if you use a developer or test account on your test device you can set a specific response, I use LICENSED as response and still get NOT_LINCESED.
  2. Resetting the phone, clearing google play store cache, application data.
  3. Changing the versioncode number in different combinations still doesn't work.

Edit: In case someone else was facing this problem I received an mail from the google support team

We are aware that newly created accounts for testing in-app billing and Google licensing server (LVL) return errors, and are working on resolving this problem. Please stay tuned. In the meantime, you can use any accounts created prior to August 1st, 2012, for testing. So it seems to be a problem with their server, if I use the main developer thread everything works fine.

4

1 に答える 1

0

アプリケーションの公開にも使用したリリース キーでアプリケーションに署名してみましたか?

アプリ内課金と同様に、これは正しいリリース キーでアプリに署名した場合にのみテストできます。そうしないと、Google はリクエストが正しいアプリからのものであることを確認できません。

于 2012-12-27T00:22:12.150 に答える