title: Getting multiple subscriptions with Android In-App Billing v3
body: <p>Library : <a href="https://github.com/anjlab/android-inapp-billing-v3" rel="nofollow noreferrer">https://github.com/anjlab/android-inapp-billing-v3</a></p>
  <p>I am using the Android In-App Billing v3 library and would like to sell one product more than once. If the subscription is purchased, I provide 1 usage right to the user. If the user wishes, he should be able to create his second subscription and buy the second right.
  <code>bp.consumePurchase (getString (R.string.trackmonth));</code> this code did not work.</p>
  <pre><code> @Override
      public void onBillingInitialized() {
  
    boolean controlnumber = bp.loadOwnedPurchasesFromGoogle();
          if(controlnumber) {
              TransactionDetails subscriptionTransactionDetails = bp.getSubscriptionTransactionDetails(getString(R.string.trackmonth));
              bp.consumePurchase(getString(R.string.trackmonth));
              if (subscriptionTransactionDetails != null) {
                  Log.d(&quot;TAG&quot;, &quot;onBillingInitialized: active&quot;);
              } else {
                  Log.d(&quot;TAG&quot;, &quot;onBillingInitialized: not&quot;);
              }
          }
  
  
     @Override
      public void onPurchaseHistoryRestored() {
          Log.d(&quot;TAG&quot;, &quot;onPurchaseHistoryRestored: &quot;);
          bp.consumePurchase(getString(R.string.trackmonth));
  
      }
  </code></pre>