Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between IABHelper and IInAppBillingService in InAPPBilling

In the google document for InAppBilling V3 they used IInAppBillingService to make purchases . check the below URL.

http://developer.android.com/google/play/billing/billing_integrate.html

Bundle buyIntentBundle = mService.getBuyIntent(3, getPackageName(), sku, "inapp", "bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ");

But in the Trivial Example coming along with SDK, they used IABHelper to make purchases.

I am having confusion like whether IABHelper is V2 and IInAppBillingService is V3.

because u cant get the available SKU Details through IABHelper . but through IInAppBillingService , it is possible

Bundle skuDetails = mService.getSkuDetails(3, getPackageName(), "inapp", querySkus);

which one is most current version ?.

like image 786
saravanan Avatar asked Jun 08 '14 12:06

saravanan


1 Answers

IABHelper is just a wrapper utility class, which intends to give you an example of how IInAppBillingService is to be used.

IInAppBillingService is a part of in-app billing API. It is used to perform purchases and check statuses. You can use this service directly and forget about the helper class.

Many people find IABHelper simpler and they use it as-is. Other people use service and ignore helper class completely.

like image 165
sergej shafarenka Avatar answered Nov 12 '22 00:11

sergej shafarenka