Skip to content

Commit

Permalink
Merge pull request #16 from eggheadgames/fix-subscription-url
Browse files Browse the repository at this point in the history
Use new Google Subscription link
  • Loading branch information
mikemee authored May 16, 2020
2 parents 1d4c6c1 + a2b7867 commit 9e4c13d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import com.android.vending.billing.IabHelper;
import com.billing.BillingService;
import com.eggheadgames.inapppayments.BuildConfig;

import java.util.List;

Expand Down Expand Up @@ -88,7 +87,12 @@ public void unsubscribe(Activity activity, String sku, int id) {
try {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://play.google.com/store/account"));

String subscriptionUrl = "http://play.google.com/store/account/subscriptions"
+ "?package=" + activity.getPackageName()
+ "&sku=" + sku;

intent.setData(Uri.parse(subscriptionUrl));
activity.startActivity(intent);
activity.finish();
} catch (Exception e) {
Expand Down

0 comments on commit 9e4c13d

Please sign in to comment.