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

OpenIAB

akarimova edited this page Oct 30, 2014 · 1 revision

OpenIAB - Open In-App Billing

Uploading Android apps to all the existing Android app stores is a painful process and the AppDF project was designed to make it easier. But what is even more difficult for the developers is supporting different in-purchase APIs of different app stores. There are already a lot of different In-App Purchase APIs (e.g. Google Play, Amazon Appstore, Nokia Store, Samsung Apps) and the number is still increasing. OpenIAB is an open source library which provides an easy way for the developers to develop their apps/games in a way that one APK will work in all the stores and automatically use the right in-app purchase API under each store. OpenIAB also provides an open in-app billing API that stores could implement to support all the built APK files using this library. Currently there are alreay 5 stores that support the Open API: Yandex.Store, SlideME, Appland, Aptoide and AppMall. The open stores don't need extra libraries to be included with your project, only OpenIAB is required to support all of them. For developers it means that in most cases they don't even need to recompile their apps for a new open store. The only thing that can be reqired is to add an RSA key if purchase verification is on the library side.

How OpenIAB Works

  1. An Android app developer integrates OpenIAB library in his/her Android code
  2. An Android app developer implements in-app purchases using OpenIAB API (which is very close to Google Play IAB API, just a few changes in source code will be needed)
  3. OpenIAB Lib detects which app store installed the app
  4. OpenIAB Lib redirects in-app purchase calls to the corresponding app store IAB API (OpenIAB Lib wraps IAB APIs of severall apstores)
  5. All In-App Billing logic is handled by the corresponding app store, OpenIAB has no code to process in-app purchases and has no UI, it just wraps In-App Billing APIs of different stores in one library

Current Status

OpenIAB SDK is used in production by wide variety of application and games. OpenIAB packages are available for Android apps and games based on Unity3d or Marmalade SDK. OpenIAB protocol is implemented by several Appstores.

We have some samples in our samples folder. To find differences between TrivialDrive provided by Google and TrivialDrive with OpenIAB, please check our sample. It demonstrates what changes need to be done to work with all Appstores and Carrier Billing.

If you an app store developer and want to know how to integrate OpenIAB protocol in your Appstore, please start with our Step-By-Step How-To

Basic Principles

  • As close to Google Play In-app Billing API as possible - we optimize the OpenIAB library by the following parameter "lines on code you need to change in an app that already works in Google Play to make it working in all the appstores"
  • One APK works in all app stores - OpenIAB chooses proper billing method automatically or follows your requirements
  • Open In-App Billing protocol - OpenIAB is designed to provide a lightweight solution that supports hundreds of appstores. When app store implements OpenIAB protocol on app store side all applications with OpenIAB become fully compatible with new app store without recompiling.
  • No middle man

Flavors need for boolean generate FORTUMO_ENABLE constant in BuildConfig class. We use this constant in condition for remove code about fortumo.

Build types debug and release are the same that in default building. Only Unity build type run proguard in project.

If you don't wanna remove fortumo code, you must use completeDebug or completeRelease build variant. For remove fortumo code you must use noFortumoUnity build variant.

In you project you must add dependencies on library project

   flavor1Compile project(path: ':OpenIab Library', configuration: 'completeRelease')
   flavor2Compile project(path: ':OpenIab Library', configuration: 'noFortumoUnity')

No Middle Man

OpenIAB is an open source library that handles OpenIAB protocol and wraps some already existing IAB SDKs as well. It is important to understand that all payments are processed directly by the app store and there is no middle man standing between the app developers and the appstores. OpenIAB is not a payment service. It is just an API how the apps communicate with app stores to request in-app billing. There is a common open API all the stores can use instead of each new store implementing their own API and developers having to integrate all these different APIs in their apps.

How Can I Help?

  • If you know about issues we missed - please, let us know in Issues on GitHub
  • If you have contacts with an app store you like, ask them to implement OpenIAB on their side
  • If you are an Android app developer check the list of open tasks, see if any of these tasks interests you and comment on it. Fork OpenIAB on GitHub and submit your code
  • If you are an app store and already support In-App Billing we will be happy to meet with your API and find best way to make it compatible with OpenIAB. Please, raise an Issue to let us know
  • If you are an app store that does not yet support in-app billing, but plans to support it, then we will be glad to help you with OpenIAB API. Please check our How-To and contact us to get deeper explanation of questions you have by raising an Issue