onepf / OpenIAB

Open In-App Billing for Google Play, SlideMe, Amazon Store, Nokia Store, Samsung Apps, Yandex.Store, Appland, Aptoide, AppMall and Fortumo.
http://onepf.org/openiab/
Apache License 2.0
473 stars 172 forks source link

Support for Upgrading/Downgrading Subscriptions #530

Open aplourde opened 8 years ago

aplourde commented 8 years ago

As describe in Android documentation a user can upgrade and downgrade subscription. For example going from a monthly subscription to a yearly subscription.

See Subscription Upgrade/Downgrade section https://developer.android.com/google/play/billing/billing_subscriptions.html

This feature is not supported in OpenIAB. I was willing to implement it myself, but the com.android.vending.billing.IInAppBillingService class included by OpenIAB doesn't include the getBuyIntentToReplaceSkus() method.

https://developer.android.com/google/play/billing/billing_reference.html#upgrade-getBuyIntentToReplaceSkus

I found a version of IInAppBillingService.aidl that includes the getBuyIntentToReplaceSkus().

https://gist.github.com/cre8ivejp/21b10fbbc7e500f99059

I can't use it because it generates the com.android.vending.billing.IInAppBillingService class which is already included in the OpenIAB Library.

Please update the IInAppBillingService class or even better, add support for upgrading/downgrading subscriptions.

Thanks, Anthony