Difference between IABHelper and IInAppBillingService in InAPPBilling

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

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 that ships with the SDK, they used IABHelper to shop.

I am confused how IABHelper is V2 and IInAppBillingService is V3.

because you cannot get available SKU information through IABHelper. but through IInAppBillingService maybe

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

which one is the latest version ?.

+6
source share
1 answer

IABHelper is just a shell utility class that intends to give you an example of using IInAppBillingService .

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

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

+9
source

Source: https://habr.com/ru/post/970533/


All Articles