I am working on Amazon In app Purchase for Android I want to display the price of the item on the user interface but I am unable to get how to display the price?
There is a method called PurchasingManager.initiateItemDataRequest
but I dont know what I need to pass to that method so that it will call the onItemDataResponse
and will give the details?
EDIT:
Please see my below Answer.
And Yes Finally after doing lot of research got to know how can i get the price to display below is the procedure:
Now we will are passing the sku to the
initiateItemDataRequest
, now after this method is called a method calledonItemDataResponse
in theButtonClickerObserver
class will be called automatically then it will call theItemDataAsyncTask().execute(itemDataResponse);
where we can update the price in our UI TextView or Button Text, it can be done in this way, just override this method in the
ItemDataAsyncTask()
.Note : updateButtonWithPrice(itemPrice) is a method which is with string as args which i have written in my activity.
Hope this will help in the future for others. :)