question

A. T. Stolk avatar image
A. T. Stolk asked ·

IAP v2 convoluted

In the old days, of IAP v1, I could add a single class to my java code, and be done with it.

Examining IAP v2 example code disappoints me: why so convoluted?

Examples should be minimal, and not bring up an entire SQL database just to store purchase records. You are making it harder to adopt the framework if the examples are not minimal.

iapandroid
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Levon@Amazon avatar image
Levon@Amazon answered ·

Hi there,

Thanks for posting. I agree that examples include more than the bare minimum, however they are geared mostly towards novice developers, showing various aspects around IAP, including saving items locally, which can be useful. You can ignore those irrelevant parts and use only what you need. I wrote a small sample that illustrates only the important parts, you can find those code samples below and adapt them to your needs as you see fit:

https://forums.developer.amazon.com/questions/16686/onpurchaseupdatesresponse-gets-called-before-onpur.html#answer-54705

https://forums.developer.amazon.com/questions/42427/amazoniapv2notifyfulfillment-doesnt-appear-to-remo.html#answer-45094

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.