I implemented in-app billing in Android application, have like 6 product they are like coins the user will buy in order to buy items in my app. The setup and the testing for
change your class to these
public class BankClass {
public int itemId;
public int quantity;
public String Price;
public BankClass(int _itemId,int _quantity,String _Price){
itemId = _itemId;
quantity = _quantity;
Price = _Price;
}
public int getItemId() {
return itemId;
}
public String getPrice() {
return Price;
}
public int getQuantity() {
return quantity;
}
}
in listitem click change these all code like bewlo
BankClass currentItem = BankList.get(position);
CoinItemID = currentItem.getItemId();
if (currentItem.getQuantity() == 100)
{
CoinItemID = currentItem.getItemId();
String payload = "";
mHelper.launchPurchaseFlow(BankActivity.this, SKU_hundred, RC_REQUEST,
mPurchaseFinishedListener, payload);
}