Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to retrieve if user had canceled Android In App subscription

I am using google in-app billing v-3 to implement Subscription.

My Subscription has one week Trail period and UI displays "Avail A Week Free" View.
If the user Subscribes and cancels for any reasons, I need to display "UpGrade" View.

As far as I googled, I learned that if users cancel's subscription while in the period of active subscription, INAPP_PURCHASE_DATA_LIST autoRenewing flag will return false.And after the subscription period ends getPurchase() could return empty.

In this scenario how could I know which UI to display, hence getPurchase() will return empty for both, when the subscription expires and when User has not Subscribed.

like image 603
ganesh Avatar asked Apr 24 '18 18:04

ganesh


People also ask

What happens if I cancel subscription on Google Play store?

If you have a subscription with an app and it's removed from Google Play, your future subscription will be canceled. Your past subscriptions can't be refunded, with some exceptions as specified in this article or in Google Play's refund policies.

Can I cancel a subscription by uninstalling the app?

Important: When you uninstall the app, your subscription won't cancel. On your Android device, go to your subscriptions in Google Play. Select the subscription you want to cancel. Tap Cancel subscription.

How do I view Android app subscriptions?

To view and manage your Android subscriptions, open the Google Play Store app on your device, then tap the menu button (the three horizontal lines in the top left), then choose Subscriptions. You'll see a list of all the subscriptions, such as Google Play Music, handled through Google.


1 Answers

Since any user can use trial only once you can check getPurchaseHistory() and see if the user has ever been subscribed to your subscription. If he was - you need to show "UpGrade" view, otherwise, you can show "Avail A Week Free" View.

like image 64
TpoM6oH Avatar answered Oct 04 '22 11:10

TpoM6oH