Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Pick Provider

Roman Zhilich edited this page Jul 1, 2015 · 7 revisions

Before proceeding make sure you understand Configuration.

Picking Billing Provider

Billing provider - is an implementation of BillingProvider interface which handles all billing operations specific to some app store or SDK.

In order to handle billing, library must first choose the most suitable billing provider. In terms of this library this process is called setup.

There are two main ways to initialize setup:

  1. Direct OPFIab.setup() call.
  2. Lazy setup through AndvancedIabHelper usage. Check In App Billing Helper for details.

Setup algorithm is not final and most likely will change in future library versions.

Most suitable billing provider will be picked according to following factors:

  • Only compatible providers will be considered.
  • If application has already worked with some billing provider, this provider will be considered first.
  • First provider to return Compatibility.PREFERRED from checkCompatibility() call will be picked.
  • If theres no preferred providers, first compatible one will be picked.
  • If no suitable provider was found, setup will fail with Status.FAILED.

More details available in JavaDoc.

Clone this wiki locally