且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

检测当前订阅是否处于Google Play商店试用版中?

更新时间:2023-11-29 15:52:04

我检查了initiationTimestampMsec和validUntilTimestampMsec之间的区别。如果它与我配置的试用期相匹配。

I'm trying to detect whether a user who has purchased my application through in-app purchase is in currently in Trial period or not.

For Apple (ios store) it was an easy flag which I could find in the receipt.

For Google Play, even though I'm making a server end call using the google play android developer API but the response itself does not contain any flags for me to understand whether the user is currently in paid or trial period.

Does any one have any smart suggestions of how to detect this in the google world?

I checked the difference between initiationTimestampMsec and validUntilTimestampMsec. If it matches my configured trial period its trial.