1

Once I buy an item in a signed app on the Market, the fee is being charged, but after the message Your item will appear shortly nothing happens. This means, I have a class with method:

public class CheckoutPurchaseObserver extends PurchaseObserver {

@Override
    public void onPurchaseStateChange(PurchaseState purchaseState,
            String itemId, int quantity, long purchaseTime,
            String developerPayload) {


        if (Consts.DEBUG) {
            Log.i(TAG, "onPurchaseStateChange() itemId: " + itemId + " "
                    + purchaseState);
        }

        if (developerPayload == null) {
            logProductActivity(itemId, purchaseState.toString());
        } else {
            logProductActivity(itemId, purchaseState + "\n\t"
                    + developerPayload);
        }


        Log.d("STATE CHANGED", purchaseState+" item "+itemId+" quantity "+ quantity);

        if (purchaseState.equals(PurchaseState.PURCHASED)) {
            if (itemId=="5_pack"){
                GameMemory.AddCredit(5);
            }
            }

This method seems never to be called. I saw on Stackoverflow that it might have something to do with the key in security.java (using this blog http://mcondev.wordpress.com/2011/06/26/integrate-in-app-billing-just-3-lines-of-code-in-your-app/#comment-74)

So, either I have to wait a long time, does anybody know when Google Play gives a reaction? Or there is probably something wrong with that key. I copied the key from the merchant account in my publish account and tested it on a device with no connection to that gmail account at all.

Do I have to remove that key when publishing maybe?

Thanks!

Diego
  • 4,011
  • 10
  • 50
  • 76
  • I found the answer, well at least, I know where the issue was. I cancelled the entire database, but that didn´t work. So I got a nullpointer exception at //Log.d("ITEM ID", itemId); //mOwnedItems.add(itemId); } //mOwnedItemsCursor.requery(); } and blocked that. – Diego Apr 03 '12 at 10:35
  • I'm having the same problem, can you share how did you solved this. – jayellos Oct 31 '12 at 09:13

0 Answers0