Test Results: consumables

Everything seems to work as expected.

It would be nice if the store.purchase function could take an array. Just so it matches the normal store.purchase behavior. It can use the first item of the array.

Devices:

Samsung Galaxy S2 2.3.4

Kindle Fire HD 7"

Kindle Fire (original)

IAPS:

Consumable

Note: It’s better to use…

if system.getInfo("targetAppStore") == "amazon" then  

… rather than a device.isKindle/etc check for any store or device related checks, because Amazon allows you to download apps onto devices other than Kindle Fires.

[quote name=“MochiBits” post=“196029” timestamp=“1375208971”] It would be nice if the store.purchase function could take an array. Just so it matches the normal store.purchase behavior. It can use the first item of the array. [/quote] +1

What I’ve done to get around the problem with the product array is to override the original store.purchase like this:

if (store.target == "amazon") then store.original\_purchase = store.purchase; store.purchase = function(products) store.original\_purchase(products[1]); end end

Nice.  I have my whole store functionality in a separate wrapper .lua so I just call the different store.function if the target store is Amazon.

Update: Our game is live and functional with consumables.

Everything seems to be working ok!

http://www.mochibits.com/s/amazon4w

Although Mochibits already posted on the same device he tested which was the Kindle (original) I’ll just post here for confirmation that is working at my end at as well.

Note: It’s better to use…

if system.getInfo("targetAppStore") == "amazon" then  

… rather than a device.isKindle/etc check for any store or device related checks, because Amazon allows you to download apps onto devices other than Kindle Fires.

[quote name=“MochiBits” post=“196029” timestamp=“1375208971”] It would be nice if the store.purchase function could take an array. Just so it matches the normal store.purchase behavior. It can use the first item of the array. [/quote] +1

What I’ve done to get around the problem with the product array is to override the original store.purchase like this:

if (store.target == "amazon") then store.original\_purchase = store.purchase; store.purchase = function(products) store.original\_purchase(products[1]); end end

Nice.  I have my whole store functionality in a separate wrapper .lua so I just call the different store.function if the target store is Amazon.

Update: Our game is live and functional with consumables.

Everything seems to be working ok!

http://www.mochibits.com/s/amazon4w

Although Mochibits already posted on the same device he tested which was the Kindle (original) I’ll just post here for confirmation that is working at my end at as well.