因此,我正在实施一种验证 Google Play 订阅的机制。
我使用 Android Publisher API 来获取订阅状态(我使用方法Purchases.subscriptions: get
- https://developers.google.com/android-publisher/api-ref/purchases/subscriptions/get
它返回一个字典:
{
"kind": "androidpublisher#subscriptionPurchase",
"startTimeMillis": long,
"expiryTimeMillis": long,
"autoRenewing": boolean
}
一切似乎都很好,但是......我应该检查expiryTimeMillis
什么?由于某种原因,谷歌没有在响应中返回它的服务器时间。我可能会假设它是 UTC+0,但我不确定,即使正确的做法是检查我从 Google 获得的过期时间与他们自己的服务器时间,但我在哪里可以从发布中获取当前时间戳应用程序接口?