java - iap v3 consumed items -
is there way list of consumed items in app.
if run:
iabhelper.queryinventoryfinishedlistener mgotinventorylistener = new iabhelper.queryinventoryfinishedlistener() { public void onqueryinventoryfinished(iabresult result, inventory inventory) { log.d(tag, "query inventory finished."); if (result.isfailure()) { log.e(tag, "#### iap error: failed query inventory: " + result); return; } log.d(tag, "#### iap query inventory successful."); // check inapp-items consume (not subs) //getskudetails(): type: value must 'inapp' in-app product or 'subs' subscriptions. if(!inventory.getallpurchases().isempty()){ log.d(tag, "#### iap 1"); int count = 0; for(purchase p : inventory.getallpurchases()){ count += 1; log.d(tag, "#### iap 2"); log.d(tag, "#### iap inventory item" + count + "=" + p.tostring()); if(inventory.getskudetails(p.getsku()).gettype().equals(iabhelper.item_type_inapp)){ mhelper.consumeasync(inventory.getpurchase(p.getsku()), mconsumefinishedlistener); } } } // if (inventory.haspurchase("android.test.purchased")) { // log.d(tag, "**** iap have android.test.purchased. consuming it."); // mhelper.consumeasync(inventory.getpurchase("android.test.purchased"), mconsumefinishedlistener); // return; // } //updateui(); //setwaitscreen(false); log.d(tag, "#### iap initial inventory query finished; enabling main ui."); } };
i got inventory non consumed , not consumable items list shows me consumed items user got app.
can 1 tell me if there way can this?
Comments
Post a Comment