onIabPurchaseFinished never called.

前端 未结 5 2142
野性不改
野性不改 2020-11-29 17:55

I\'ve been trying to set up in-app billing for my first app, and have been using the android.test.purchased sku. The purchase come through, and I manage to get the SKU into

5条回答
  •  臣服心动
    2020-11-29 18:43

    i just found out another important thing: the requestCode that is used to launch the purchase flow has to be >= 0!

    i used "new Random().nextInt()" to generate a random requestCode, and sometimes it worked, sometimes it didn't. now i found out in the following documentation, that the requestCode should not be a negative number:

    http://developer.android.com/reference/android/app/Activity.html#startActivityForResult%28android.content.Intent,%20int%29

提交回复
热议问题