0

I used this library for In-app Billing in android purchase https://github.com/anjlab/android-inapp-billing-v3

For purchasing everything is fine but my problem is when In-app Billing event purchase call in fragment onProductPurchased event don't call because onActivityforResult doesnt call in fragment

Fragment Code :

 bp = new BillingProcessor(getActivity(), Constants.KEY_BASE64_PUBLICK_KEY, this);
        bp.initialize(); // binds
   boolean isAvailable = BillingProcessor.isIabServiceAvailable(getActivity());
                if (isAvailable) {
 bp.purchase(getActivity(), SKU_Pro);
}

I also checked this page https://github.com/anjlab/android-inapp-billing-v3/issues/100

sr_ farzad
  • 45
  • 1
  • 9
  • May be this can link can help you : https://stackoverflow.com/questions/6147884/onactivityresult-is-not-being-called-in-fragment – MRX Jun 23 '17 at 07:31
  • can you give me the best solution for this issue ? – sr_ farzad Jun 23 '17 at 07:42
  • I don't know why google doesn't have any clear documentation for In-app Billing ? – sr_ farzad Jun 23 '17 at 08:44
  • I am using this Library compile 'org.solovyev.android:checkout:1.0.0' for my in-app billing functionality. Its easy to implement and has an sample for fragment as well. may be it can help you. – MRX Jun 23 '17 at 09:06
  • @MRX I'm not able to find the sample code for fragments, where can you find it? – Denny Feb 13 '18 at 21:08

0 Answers0