This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Pick Provider
Roman Zhilich edited this page Jul 1, 2015
·
7 revisions
Before proceeding make sure you understand Configuration.
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:
- Direct
OPFIab.setup()
call. - 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
fromcheckCompatibility()
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.