简体   繁体   English

Google play 订阅免费试用

[英]Google play Subscriptions Free trial

Is there any way how to check if user've already used his free trial?有什么方法可以检查用户是否已经使用了他的免费试用版?

When I query sub I got the next data:当我查询 sub 时,我得到了下一个数据:

[
    SkuDetails:{
        "productId":"...",
        "type":"subs",
        "price":"...",
        "price_amount_micros":0000,
        "price_currency_code":"USD",
        "subscriptionPeriod":"P1M",
        "freeTrialPeriod":"P1W1D",
        "title":"...",
        "description":"..."
    }
]

Will this field "freeTrialPeriod":"P1W1D" disappear when a user uses his free trial?当用户使用他的免费试用版时,这个字段 "freeTrialPeriod":"P1W1D" 会消失吗? Or maybe there's some other way to know it?或者也许有其他方式知道它?

I need to show "free" instead of subscription price and then show actual price after user used his free trial我需要显示“免费”而不是订阅价格,然后在用户使用免费试用后显示实际价格

In the documentation, Google clearly emphasizes that this is Google Play responsibility to show the user that they have used the free trial.在文档中,Google 明确强调,这是 Google Play 的责任,向用户展示他们已经使用了免费试用版。

Note: SkuDetails.getFreeTrialPeriod() returns the free trial period configured in Google Play Console.注意:SkuDetails.getFreeTrialPeriod() 返回在 Google Play Console 中配置的免费试用期。 It's possible the user has already used a free trial.用户可能已经使用了免费试用版。 In this case, Google Play communicates to the user that they are ineligible for another free trial.在这种情况下,Google Play 会通知用户他们没有资格再次免费试用。

Free Trial Documentation 免费试用文档

It means you can show the user (3 days free then price/time) always or you need to handle it manually (using shared preferences, your own server, using query purchase history async to keep shared presence status up to date in case of reinstalls)这意味着您可以始终向用户显示(免费 3 天,然后是价格/时间),或者您需要手动处理(使用共享首选项、您自己的服务器、使用异步查询购买历史来保持共享状态在重新安装时保持最新) )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM