in app purchase - Android In-App-Billing refund/cancel takes long -


)

i'm trying implement in-app-billing within app. in google play developer console declared managed item. buying item works fine. now, when refund or cancel purchase in google wallet merchant center, app takes long (more days) recognize item not longer owned.

i've read lots of other articles problem , think 1 logical explanation purchase saved in cache of google play store. although know question has asked before, ask here again:

is possible clear cache or know how tell app, when purchase not longer owned?

i'm thankful hint, helps me solve problem :d

in addition, code ask, if item purchased. i'm using in-app-billing v3.

public boolean hasuserboughtitem() {      try {         bundle owneditems = mservice.getpurchases(musedapi, mcontext.getpackagename(),                 mpurchasetype, null);          int response = owneditems.getint("response_code");         if(response == 0) {             arraylist<string> ownedskus = owneditems.getstringarraylist("inapp_purchase_item_list");              if(!ownedskus.isempty()) {                 for(string sku : ownedskus) {                      if(sku.equals(constants.item_id_all_recipes)) {                         return true;                     }                 }             }               return false;         }     } catch(exception e) {         e.printstacktrace();     }      return false; } 

the iap purchase inventory isn't cached play store @ , should queried regularly in activities. should take approximately 15-30mins order cancellations propagate.

are using iabhelper per sample app connect google play?

 iabhelper.queryinventoryfinishedlistener mgotinventorylistener     = new iabhelper.queryinventoryfinishedlistener() {    public void onqueryinventoryfinished(iabresult result,       inventory inventory) {        if (result.isfailure()) {         // handle error here       }       else {         // user have premium upgrade?         mispremium = inventory.haspurchase(sku_premium);                 // update ui accordingly       }    } }; 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -