Search code examples
androidin-app-billingandroid-billing

In-app billing, can't make RESULT_DEVELOPER_ERROR go away


I'm trying to get in-app billing working on android, but keep getting the following logcat output upon trying to initialize transactions:

// from logcat, BillingService:
Billing service connected
CheckBillingSupported
CheckBillingSupported response code: RESULT_OK
RestoreTransactions 
   restoreTransactions received RESULT_OK
     request id: 12345
     request id: -1
handleCommand() action: [com.android.vending.billing.RESPONSE_CODE].
RestoreTransactions: RESULT_DEVELOPER_ERROR

My setup:

  1. I have the billing permission in the manifest.
  2. The billing service and receiver are defined in the manifest.
  3. My app is not published, I just have a draft up.
  4. I created a single in-app item, and published it.
  5. I have a test account added, but not sure that it makes a difference at this point.
  6. Both the draft apk in marketplace, and the apk on my phone are signed in release mode with the same key and have the same versionCode.

I've gotten in-app purchases to work in another app, but in that case I already had a version of the app published. In this case (as mentioned in #3), I've never published the apk once. Do we have to publish the app once for this to work? I'd assume not,

Thanks


Solution

  • You don't need to have the app published on Google Play, a draft is enough.

    The 6 points you've mentioned are ok but I guess you need to check extra requirements as mentioned in the doc:

    RESULT_DEVELOPER_ERROR:
    

    Indicates that an application is trying to make an in-app billing request but the application has not declared the com.android.vending.BILLING permission in its manifest. Can also indicate that an application is not properly signed, or that you sent a malformed request, such as a request with missing Bundle keys or a request that uses an unrecognized request type.