Redirect user to the Subscription page in the playstore
Asked Answered
A

3

33

I've been reading this website : http://developer.android.com/google/play/billing/billing_subscriptions.html Because I read that "Currently, the In-app Billing API does not provide support for programatically canceling subscriptions from inside the purchasing app", I would like to redirect the user to this page to manage his own subscription.

I'm not able to find how to open the subscription page from an application. I was thinking about opening it like a external link with :

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

But I don't even know the link I need to put in... -_-

Thanks in advance for your answer! :)

Apparently answered 22/4, 2016 at 23:47 Comment(2)
Can people at least explain why they down-vote my question? Sorry, but for me, no question are "stupid", so if it's so easy, just tell me the link to the answer or a piece of code!Apparently
This is from the official Android Developers website: developer.android.com/google/play/billing/subs#deep-linkFabria
A
45

Ok, so I haven't received a better answer (actually... no answer at all..yet). For other that might research an answer, here is mine :

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

Note: It seems, that the market: syntax is deprecated and the web intent is automatically forwarded to the PlayStore app.

Apparently answered 29/4, 2016 at 18:23 Comment(0)
H
16

Thanks for the code, it helps.

Just to add a little in the URL,

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

to take you directly at the Subscriptions screen in the phone.

Hotpress answered 2/8, 2017 at 1:21 Comment(0)
H
13

At google io 2018 they announced this link

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

Just replace sku and package

Heterosexuality answered 9/5, 2018 at 0:27 Comment(2)
in v6 they replaced code "sku" with "product" , this url also need to update ?Beamer
Still sku in official doc. developer.android.com/google/play/billing/…Blond

© 2022 - 2024 — McMap. All rights reserved.