1. 程式人生 > >In-app purchases on Android: new and upcoming

In-app purchases on Android: new and upcoming

In-app purchases on Android: new and upcoming

A closer look at the I/O 2018 announcements

Google I/O 2018 is just behind us, but it brought a lot of news when it comes to in-app purchases, both already available and coming soon. In this article, I will try to summarize all the new announcements (spoiler: there’s a ton of stuff!

) and explain what they are and how can you benefit from them.

Let’s begin!

Play Billing Library 1.1

Availability:

The Play Billing Library (PBL, in short) was announced in September 2017 and has since started gaining traction, due to its immensely simpler integration process and guarantee of support. Most importantly, it is and will be the only way to get new features going forward!

“When we roll out price changes, that feature will also only be available via the Play Billing Library”

I was curious and I took a look at the source code of the library. The way Google will enforce these “exclusive” features seem to be done at the In-app Billing Service level that lives within Play Services, by checking the package name of the client and its version. 
This announcement also implies that C++ support will be provided, and it’s already in the works at the time of this writing.

There is already one feature that is only available if you make use of PBL, and that’s the ability to upgrade/downgrade on the same renewal date. Let’s take a look.

Upgrading/downgrading on the same renewal date

When migrating to a different subscription product, the billing date would change most of the times. With this new capability, the developer controls what happens to the billing cycle. There are three supported modes:

IMMEDIATE_WITH_TIME_PRORATION
The default behavior. When downgrading, the billing date is changed according to the remaining amount of the last time the user paid. When upgrading, the user is charged immediately and, again, the new billing date is calculated according to the amount that was last paid.

IMMEDIATE_AND_CHARGE_PRORATED_PRICE
This is only available when upgrading a subscription, and allows the billing date to remain unchanged and the user to be charged immediately.

IMMEDIATE_WITHOUT_PRORATION
This option allows to leave the billing date unchanged, but to let the user be charged at the next billing cycle.

Change existing SKUs price points

This is such a huge deal for so many companies and developers! Before, changing price points was a manual ordeal: one would have to create a new SKU with the new price point, have the app check for users on the old price point, and prompt them to upgrade/downgrade. But “now” (it’s still in Early Access Program, you can apply here) all you need to do is changing the price point, and the Play Store will handle that automatically for you. How awesome is that!

It’s worth noting that this feature will also be a PBL exclusive going forward.

Play Store

Availability: ✅