Reputation: 31
When using Google Play Billing Library(GPBL) 2 in the client, the first renewal real-time developer notification(RTDN) arrives 22 hours after the subscription expiration.
Such gap might cause denial of our services for the user.
With GPBL 1.2.2 in the client, the renewal RTDN arrives 2 hours prior to the subscription expiration.
Use any GPBL version 2+ in an android client app. (Tested with GPBL 2.0.3, 2.1.0, 2.2.0)
Tested with:
7-day trial Paid subscription.
5min, 15min, 30min Test subscriptions (For Test subscriptions the RTDN arrives 10 seconds after the expiration when using GPBL 2, as opposed to 2 minutes before the expiration when using GPBL 1.)
5min Test subscription used in the following example:
GET https://www.googleapis.com/androidpublisher/v3/applications/[packageName]/purchases/subscriptions/[subscriptionId]/tokens/[token]
{
"expiryTimeMillis": 1584703350967, // "2020-03-20T11:22:30.967Z"
"autoRenewing": true,
"priceCurrencyCode": "CZK",
"priceAmountMicros": 159990000,
"paymentState": 1,
"orderId": "GPA.3399-3829-9285-87596",
"acknowledgementState": 0
}
POST https://www.googleapis.com/androidpublisher/v3/applications/[packageName]/purchases/subscriptions/[subscriptionId]/tokens/[token]:acknowledge
{
"developerPayload": null
}
// "2020-03-20T11:22:41.173Z"
{
"countryCode":"CZ",
"developerPayload":"",
"kind":"androidpublisher#subscriptionPurchase",
"orderId":"GPA.3399-3829-9285-87596..0",
"priceCurrencyCode":"CZK",
"autoRenewing":true,
"expiryTimeMillis":1584703770967, // "2020-03-20T11:29:30.967Z"
"startTimeMillis":1584702935111, // "2020-03-20T11:15:35.111Z"
"priceAmountMicros":159990000,
"paymentState":1,
"purchaseType":0
}
The notification arrived 10 seconds later than the original expiration time!
The only difference I'm aware of is the different GPBL version in the Android client and the purchase acknowledgement call which is required by the GPBL 2.
Only the first renewal notification is delayed. Subsequent renewal notifications are on-time, 2 minutes prior to each expiration.
Is there anything to do to get the first renewal notification before the expiration?
Thanks for any hint or advice!
Upvotes: 3
Views: 1777