Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid In app Subscription not working
    primarykey
    data
    text
    <p>i am developing a app in android using in app subscription. i am trying to query my purchase items using IabHelper.QueryInventoryFinishedListener. but it always coming as a failure results. IabResult returns failure. i added in app products in developer console. can any one help me on this?</p> <p>here is some of my code,</p> <pre><code>bindService(new Intent("com.android.vending.billing.InAppBillingService.BIND"), mServiceConn, Context.BIND_AUTO_CREATE); String base64EncodedPublicKey = "my key"; mHelper = new IabHelper(this, base64EncodedPublicKey); mHelper.enableDebugLogging(true); mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() { public void onIabSetupFinished(IabResult result) { if (!result.isSuccess()) { System.out.println("Not Success"); Log.d("In APP Billing", "Problem setting up In-app Billing: " + result); return; } else { System.out.println("Success"); Log.d(" In APP Billing", "Setting up In-app Billing Success: " + result); } List&lt;String&gt; additionalSkuList = new ArrayList&lt;String&gt;(); additionalSkuList.add(SKU_ID); mHelper.queryInventoryAsync(true, additionalSkuList, mQueryFinishedListener); } }); IabHelper.QueryInventoryFinishedListener mQueryFinishedListener = new IabHelper.QueryInventoryFinishedListener() { @Override public void onQueryInventoryFinished(IabResult result, Inventory inv) { // TODO Auto-generated method stub if (result.isFailure()) { // handle error System.out.println("mQueryFinishedListener is Failure"); // i am always getting this return; } System.out.println("mQueryFinishedListener is Success"); Boolean hasPur = inv.hasPurchase(SKU_ID); if (hasPur) { System.out.println("Query - - subscribed "); isSubscribed = true; } else { System.out.println("Query - not subscribed "); isSubscribed = false; } System.out.println("Purchase panic:"+inv.getPurchase(SKU_ID)); } }; </code></pre> <p>any idea why its not working? thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload