你如何处理与LicenseCheckerCallback.ERROR_NOT_MARKET_MANAGED错误code? [英] How do you deal with LicenseCheckerCallback.ERROR_NOT_MARKET_MANAGED error code?

查看:291
本文介绍了你如何处理与LicenseCheckerCallback.ERROR_NOT_MARKET_MANAGED错误code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 com.android.vending.licensing ,你可以检查你的应用程序的许可与否。有一个回调,的ApplicationError(),告诉你,如果出了什么差错。今天,我遇到了错误 ERROR_NOT_MARKET_MANAGED ,我想不出我应该怎么处理呢!

Using com.android.vending.licensing you can check if your app is licensed or not. There is a callback, applicationError() that tells you if anything went wrong. Today I encountered error ERROR_NOT_MARKET_MANAGED and I can't figure out how I should deal with it!

下面是我所做的:

  1. 在谷歌玩,我说我的电子邮件地址作为一个测试帐户。
  2. 在谷歌玩,我救了我的应用程序(未发表)与版本code =10
  3. 在我的机器上,我更改为版本code =11
  4. 许可检查现在失败,错误code ERROR_NOT_MARKET_MANAGED
  1. On Google Play, I added my e-mail address as a test account.
  2. On Google Play, I saved my app (unpublished) with versionCode="10".
  3. On my machine, I changed to versionCode="11".
  4. License check now fails with error code ERROR_NOT_MARKET_MANAGED.

现在的问题是,我应该处理这个错误,或者这是一种不切实际的情况?

The question is; should I handle this error or is this an unrealistic scenario?

推荐答案

ERROR_NOT_MARKET_MANAGED :这个名字实在告诉所有关于本身,应用程序不是由Android电子市场管理(现在叫谷歌播放)。更具体地讲,您的应用程序的11版本是没有上传或发布在谷歌播放。

ERROR_NOT_MARKET_MANAGED: the name really tells all about itself, application is not managed by Android Market (now called Google Play). More specifically, the version 11 of your application is not uploaded or published in Google Play.

应该怎么处理这个错误,或者这是一种不切实际的情况?

should I handle this error or is this an unrealistic scenario?

我会认为这是一个不切实际的方案。你并不需要花费很长时间做什么特别的事情在code,你上传新的应用程序版本,谷歌播放。 ERROR_NOT_MARKET_MANAGED更像是它帮助开发人员正确实施许可检查code,并按照正确的程序进行测试许可检查,在项目建设时间LVL开发警告。检查出样品拉特code的评论:

I would consider this as an unrealistic scenario. You don't need to do anything special in code as long as you upload the new app version in Google Play. ERROR_NOT_MARKET_MANAGED is more like a LVL development warning which help developer properly implement license checking code and follow the correct procedure for testing license checking at project build time. check out the comments in LVL sample code:

private class MyLicenseCheckerCallback implements LicenseCheckerCallback {

    ... ...

    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.
        //String result = String.format(getString(R.string.application_error), errorCode);
        //String result = "Error";
        //handleLicensingResult(result);
    }
}

LVL集成到应用程序的整点是使用谷歌播放发布应用程序,并使用谷歌播放客户端应用程序下载和安装应用程序(见的Requirements和限制的开发指南部分)。我看不到任何一点,可能会导致这个的ApplicationError在运行时终端用户的设备,如果上:

The whole point of integrating LVL into your application is to use Google Play publish your application, and use Google Play client application download and install your application (see Requirements and Limitations section in dev guide). I can't see any point that can cause this applicationError at runtime on end user's device if:

  1. 开发遵循正确的步骤上载(用于测试LVL),或在谷歌发布(真正释放)播放。
  2. 在最终用户使用谷歌播放客户端应用程序购买,下载和安装应用程序。

如果一个最终用户以某种方式让你的应用程序的复印件(LVL集成和上传/发表在谷歌播放)从其他渠道(而不是通过谷歌购买播放),并试图以自己的设备上安装它(与谷歌播放客户端应用程序安装在该设备上),在这种情况下,LicenseCheckerCallback将去dontAllow(),而不是的ApplicationError(的ApplicationError code的误差code)中。

If a end user somehow get a copy of your application (with LVL integrated and uploaded/published in Google Play) from other channel (not purchase via Google Play) and trying to install it on his device (with Google Play client application installed on that device), in this case, LicenseCheckerCallback will go to dontAllow() rather than applicationError(ApplicationErrorCode errorCode).

这篇关于你如何处理与LicenseCheckerCallback.ERROR_NOT_MARKET_MANAGED错误code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆