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.
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
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.
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
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.