Google Play Billing Library Version?7.0.0
Udara Abeythilake
Mobile App Developer at PixelForce(Android , Flutter, React-Native)
Have you already upgraded the billing library to?7?
The deadline is the 31st of August. If you still haven’t updated your billing library to 6 or higher, you cannot publish a new version of your app to the Play Store. But don’t worry you can request an extension up to the 1st of November 2024.
What is the Google Play Billing?library?
Google Play billing system is the library developed by Google that enable you to sell your digital products and content in your Android app. This content may be a one-time purchase or subscription-based (charge monthly or annually). As a service, if you are aiming to sell digital products or subscriptions for users this is the best Billing system on the Android platform. Google Play offers bunch of APIs which support both your App and server backend.
Version Deprecation
The latest version of the Google Play Billing library is 7.0.0. As announced at Google I/O in 2019 each library version has a two-year deprecation cycle. That means if you integrate Google Play Billing library version 7.0.0 in the year 2024(latest version) you can use this library without upgrading until the 31st of August 2026. From the below, you can see that it.
Summary of new changes in version?7
1. New APIs to support installment subscriptions.
With this feature, the user can now pay the subscription in installments rather than the whole amount at once. That means from the developer side they can configure the price for one installment(one month) and indicate how many commitment periods (number of installments) for the subscription. The price of one installment combined with the commitment period brings the total price for the subscription. Note that this feature is only available for the below countries.
· Brazil
· France
· Italy
· Spain
2. Support for Pending Purchases (Prepaid Plans)
Google Play Billing Library 7 introduces support for pending purchases in prepaid plans, enhancing flexibility for developers and users. This feature allows customers to initiate purchases requiring further action, such as payment verification, before completion. Pending purchases are especially useful in scenarios like prepaid subscriptions where users may want to pay upfront for a specific duration without automatic renewal.
How It Works:
Google has provided guidelines on handling subscriptions and pending transactions in the Handle Subscriptions and Pending Transactions guide.
3. Removal of Proration Mode
领英推荐
In version 5 ProrationMode is used when the user is going to update or downgrade the subscription to handle the next payment interval. So, API has been removed from version 7 and replaced with a new class called ReplacementMode
Benefits of Migrating to Play Billing Library?7
1. Backward compatibility and optional API changes. You don’t need to make any changes to migrate the billing library to version 7. Since all the new Google Billing Library APIs are optional. Just need to remove some deprecated class usage and update with the new class names.
Steps for Migrating from Play Billing Library to?7
In the build.gradle file in the app module updates the billing library version to 7.
dependencies {
implementation "com.android.billingclient:billing:7.0.0"
}
Next, update the API you used in the application.
In version 5 ProrationMode is used when the user is going to update or downgrade the subscription to handle the next payment interval. So, API has been removed from version 7 and replaced with a new class called ReplacementMode
The below APIs have been removed and replaced with new sets of APIs. If you are using any old APIs, please rename those to new APIs as in the below table.
Also, in version 7 alternative billing APIs are removed. If you are using BillingClient.Builder.enableAlternativeBilling with AlternativeBillingListener you should use BillingClient.Builder.enableUserChoiceBilling() with UserChoiceBillingListener and UserChoiceDetails
Other things you must know with Google Play Billing?Library
In addition to the two new APIs, PBL 7 introduces several optional changes aimed at improving the overall billing experience. These changes enhance the billing flow, reduce friction, and provide more transparency to users during the purchase process.
Key Optional Features:
While these APIs are optional, adopting them can lead to better user experiences and more flexibility in how purchases and subscriptions are managed.
Summary
Migrating to Google Play Billing Library 7 brings several significant benefits, including enhanced user experience through features like installment subscriptions and the ability to handle pending transactions efficiently. These advancements enable smoother subscription management, better monetization opportunities, and a more reliable in-app purchase framework. By staying updated with the latest tools, developers can leverage these new features to offer a more seamless experience to their users and stay competitive in the ever-evolving app ecosystem.