Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android licensing sample returns code 3. What does it mean?

I tried licensing sample. It said "application error=3". I found the sheet of licensing response codes at developer.android.com, but how does number 3 corresponds to the above list? What does that code mean?

like image 886
nms Avatar asked Aug 08 '12 09:08

nms


People also ask

What is Android license Verification?

It manages a connection between your app and the Android Market (now Google Play), and performs a license check with the server to see if the user has a valid license for your app (i.e. it was purchased legitimately through the market). In other words, it's a form of Digital Rights Management (DRM).

What is Google Play license?

Google Play offers a licensing service that lets you enforce licensing policies for the apps that you publish on Google Play. With the licensing service, your apps can query Google Play at runtime to obtain their licensing status for the current user, then allow or disallow further use as appropriate.


1 Answers

Check out source code com.android.vending.licensing.LicenseValidator:

/**
 * Contains data related to a licensing request and methods to verify
 * and process the response.
 */
class LicenseValidator {
  private static final String TAG = "LicenseValidator";

  // Server response codes.
  private static final int LICENSED = 0x0;
  private static final int NOT_LICENSED = 0x1;
  private static final int LICENSED_OLD_KEY = 0x2;
  private static final int ERROR_NOT_MARKET_MANAGED = 0x3;
  private static final int ERROR_SERVER_FAILURE = 0x4;
  private static final int ERROR_OVER_QUOTA = 0x5;

  private static final int ERROR_CONTACTING_SERVER = 0x101;
  private static final int ERROR_INVALID_PACKAGE_NAME = 0x102;
  private static final int ERROR_NON_MATCHING_UID = 0x103;

  ... ...

"application error=3" means ERROR_NOT_MARKET_MANAGED, check out answer here to see how to deal with it.

like image 52
yorkw Avatar answered Oct 03 '22 19:10

yorkw