19

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?

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
nms
  • 577
  • 1
  • 10
  • 27
  • possibel duplicate of this link http://stackoverflow.com/questions/5526889/android-license-check-going-straight-to-applicationerror – Adeel Pervaiz Aug 08 '12 at 10:09
  • There is no answaer to my question: what each reponse code means in sample. – nms Aug 08 '12 at 10:21

1 Answers1

37

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.

Community
  • 1
  • 1
yorkw
  • 40,926
  • 10
  • 117
  • 130
  • But what about apps that are still in development phase? Those apps would certainly not be market-managed apps, right? – milosmns Jan 06 '15 at 17:57