【问题标题】:Redirect user to the Subscription page in the playstore将用户重定向到 Playstore 中的订阅页面
【发布时间】:2016-08-16 17:45:20
【问题描述】:

我一直在阅读这个网站: http://developer.android.com/google/play/billing/billing_subscriptions.html 因为我读到“目前,In-app Billing API 不支持从购买应用程序内部以编程方式取消订阅”,所以我想将用户重定向到此页面以管理他自己的订阅。

我无法找到如何从应用程序打开订阅页面。 我正在考虑像使用外部链接一样打开它:

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);

但我什至不知道我需要输入的链接... -_-

提前感谢您的回答! :)

【问题讨论】:

  • 人们至少可以解释为什么他们对我的问题投了反对票吗?对不起,但对我来说,没有问题是“愚蠢的”,所以如果它这么简单,只需告诉我答案的链接或一段代码!
  • 来自 Android 开发者官方网站:developer.android.com/google/play/billing/subs#deep-link

标签: android google-play google-play-services in-app-billing in-app-subscription


【解决方案1】:

在 google io 2018 上,他们宣布了这个链接

https://play.google.com/store/account/subscriptions?sku=XXX&package=YYY

只需更换sku和包装

【讨论】:

    【解决方案2】:

    好的,所以我还没有收到更好的答案(实际上……根本没有答案……还没有)。 对于其他可能研究答案的人,这是我的:

        Intent browserIntent = new Intent(Intent.ACTION_VIEW,
                       Uri.parse("https://play.google.com/store/account/subscriptions"));
        startActivity(browserIntent);
    

    注意:看来,market: 语法已被弃用,网络意图会自动转发到 PlayStore 应用程序。

    【讨论】:

      【解决方案3】:

      感谢您的代码,它有帮助。

      只是在网址中添加一点,

      https://play.google.com/store/account/subscriptions

      直接带您进入手机的订阅屏幕。

      【讨论】:

        猜你喜欢
        • 2021-09-18
        • 2011-12-25
        • 1970-01-01
        • 2014-02-28
        • 1970-01-01
        • 1970-01-01
        • 2018-06-15
        • 2015-08-14
        • 1970-01-01
        相关资源
        最近更新 更多