Download

4.11 In-app purchase information reporting back incorrectly.

Engine 4.11.1

I can’t be sure if this is the engine’s fault or Google but whenever I request bulk ‘Read In-App Purchase Information’ the prices returned do not match properly to the product unique ID. But if I try to purchase an item I’m prompted to pay the proper amount.

This wasn’t an issue in 4.10.

I first make an array of all unique IDs for my cash items. Each cash item is a structure, all are held in a single array - this array is called ‘CashStoreItems’.
makepurchaselist.png

Then I sort through the results from ‘Read In-App Purchase Information’ by comparing each array item’s ‘Identifier’ to the UniqueID(or Identifier) I’ve entered for each cash item in it’s structure.
49035f1e86794e827da562f2eb09b6498b1a96f3.png

As you can see the FindCashItemIndex function compares the UniqueID(or Identifier) reported by the ‘Read In-App Purchase Information’ call against what I have stored for each cash item.
If there is no match found for the UniqueID then the FindCashItemIndex responds back with a -1 value, which will prevent any further action on that item.
However, if a match is found an index of the cash item in my ‘CashStoreItems’ array is provided.
aac285e9c284ee5522fddb3980e1e0ffa19b016a.png

Once I have that index I pull information about how to display the product from my CashStoreItems array, and set the display price using data gathered from the ‘Read In-App Purchase Information’ response. Since I’m comparing the unique identifiers there is no room for error, yet the wrong prices are being reflected for items. As mentioned before this worked just fine in 4.10.

Android Marshmallow Moto X 2014.

This is a bug. I compiled the same project in 4.10 and there were no issues. Submitted bug report.