i trying implement in app purchasing , have had problems days. when user attempts make purchase successful app giving odd error apparently dates os build honeycomb prevents users receiving purchase until click buy button again.
steps:
make purchase
purchase successful
no consumable given
click purchase button again
consumable given
here error getting when consumable isn't given:
log tag: finsky
log message [1] 1.run: missing delivery data inapp:com.mybillingproblem:one_chip
pid/tid: 26927
code:
public void onechip(string noval) { log.v("onechip", "calling launch purchase flow"); bp.purchase(this, itemone); log.v("onechip", "made through launch purchase flow"); } bp = new billingprocessor(this, base64encodedpublickey, new billingprocessor.ibillinghandler() { @override public void onbillinginitialized() { log.v("chip", "billing initialized"); readytopurchase = true; } @override public void onproductpurchased(string productid, transactiondetails details) { log.v("chip", productid + " purchased"); if (bp.consumepurchase(productid)) { if (productid == "itemone" || productid == "one_chip") chipupdate.updatechipcount(2500); } } @override public void onbillingerror(int errorcode, throwable error) { log.v("chip", "error code: " + errorcode); log.v("chip", "error: " + error); } @override public void onpurchasehistoryrestored() { (string sku : bp.listownedproducts()) log.v("chip", "owned managed product: " + sku); (string sku : bp.listownedsubscriptions()) log.v("chip", "owned subscription: " + sku); } });
note: using in app billing v3 jar. don't think issue though has come recommended , seems commonly used wrapper.
thanks!
how activity's onactivityresult() like? have one? pass the result to iabhelper's handleactivityresult
like so:
@override protected void onactivityresult(int requestcode, int resultcode, intent data) { // pass on activity result iab helper handling if (!mhelper.handleactivityresult(requestcode, resultcode, data)) { // not handled, handle ourselves (here's you'd // perform handling of activity results not related in-app // billing... super.onactivityresult(requestcode, resultcode, data); } }