I'm using Google Billing
and trying to understand if subscription is expired or not with two solutions:
billingClient.queryPurchaseHistoryAsync(BillingClient.SkuType.SUBS) { billingResult, purchasesList -> }
val purchasesList = billingClient.queryPurchases(BillingClient.SkuType.SUBS).purchasesList
And they returns something like that:
{
"productId": "weekly_with_trial",
"purchaseToken": "someToken",
"purchaseTime": 1563305764597,
"developerPayload": null
}
{
"orderId": "GPA.3380-7704-5235-01361",
"packageName": "com.myapp",
"productId": "weekly_trial_trial",
"purchaseTime": 1563305764597,
"purchaseState": 0,
"purchaseToken": "someToken",
"autoRenewing": false,
"acknowledged": false
}
Both of them return me a list of purchases without any info about if it expired or not. How to check it ?