question

101apps avatar image
101apps asked

Price - is it possible to get the price of an item to display in the app?

hi, is it possible to get the price (and maybe some details) of the item to display in the app before the user presses the buy button? hopefully in appropriate currency? if so, how? thanks regards 101apps
iap
10 |5000 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.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi 101apps, Thank you for your post. Yes. It's certainly possible to get the details of the items inb the run time. If you call initiateItemDataRequest() with a set of sku names as arguments, you would receive a call back to onItemDataResponse() of observer with ItemDataResponse object. And itemDataResponse.getItemData() would return you a map of sku and Item objects. you can iterate all items and get the details of every item like price in correct currency, description etc. https://developer.amazon.com/sdk/in-app-purchasing/reference/api-reference.html
10 |5000 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.

101apps avatar image
101apps answered
hi, fantastic! thanks but.... will it show the correct currency depending on country where the app is used? so in USA will it show the dollar sign and in UK sterling pound sign, etc thanks regards 101apps
10 |5000 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.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Yes. It will show the correct currency value/symbol according the current market place.
10 |5000 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.

101apps avatar image
101apps answered
hi, i notice when testing that the price does not show a currency symbol and that the trailing decimal digits are not shown (zeros). so for a price of $12.00 only 12 is displayed and for a price of $12.70 only 12.7 is displayed. is this correct? will it display correctly when live? thanks regards 101apps
10 |5000 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.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Yes. In live getPrice() Returns the localized price of the item as a String. The price will include the currency symbol and be formatted appropriately based on the locale, i.e. in US $X.YZ and in France X,YZ€.
10 |5000 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.