Android Billing Library - Hybrid Applications

·

2 min read

behold-my-stuff-gif.gif

I did a thing again

I am pleased to provide the community with a solution for adding the Android Billing Library into Hybrid Applications written in CapacitorJS. Specifically this plugin allows developers to utilise Qonverion.io to communicate with your Play Store developer account and authenticate users subscription information.

Basically, I found out that in order to correctly setup an application for a SaaS model, Android App Subscriptions, the application is required to have the billing library installed within the application but it is also highly recommended to have a user subscription authentication server that sits between your app and the play store API so that the locking / unlocking of features can be handled securely. Additionally, if the application does not include the Google Billing Library then any subscriptions that may have been setup for application would be altered. Specifically, subscriptions are altered to just be a flat, one off payment rather than a recurring payment on a weekly / monthly / yearly interval.

This plugin was quite fun to build as I had to navigate the Google developer documentation and learn some Java and Typescript and how exactly this all fits together and how to test it.

There are still improvements that need to be made with this plugin. However it is available for testing now and I will be providing this plugin as an NPM package once the Qonversion development team have had a chance to look at it. Additionally, iOS will eventually be on it's way. However for now this is just the Android version.

Hopefully developers in a similar situation to myself, looking to build a hybrid applications with billing support for subscriptions, find this useful.

If you find it useful, like it or think it's cool then be a ★ and please give the project a ★. Thanks all!

Capacitor Qonversion Plugin