RevenueCat / purchases-android

Android in-app purchases and subscriptions made easy.
https://www.revenuecat.com/
MIT License
249 stars 51 forks source link

Trial Period of a product #1051

Open mohsin-ali-brainx opened 1 year ago

mohsin-ali-brainx commented 1 year ago

We've upgraded my RevenueCat dependency from 5.4.0 to 6.4.0 as we've got the warning for using deprecated version of Google Billing library. After upgrading we've notice major changes in the code and I missing functionality of trial period data as in 5.4.0 we were able to get the data using "getProduct().getFreeTrialPeriod()" but not there is not such method available and no alternative as well or I'm unable to find one. If you could add this back or help us out how to get trial period data of each product of current offering. Thanks

RCGitBot commented 1 year ago

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

mohsin-ali-brainx commented 1 year ago

Also if we do getProduct().getSubscriptionOptions().getFreeTrial() we get null though we have product having a trial period of 7 days and is added correctly on Google Play console under subscription.

HaleyRevcat commented 1 year ago

In the new Android SDK, you can view available offers by checking the subscriptionOptions property on a StoreProduct: https://www.revenuecat.com/docs/subscription-offers#more-control-over-offer-selection. The free trial property should include the data you're expecting to find.

mohsin-ali-brainx commented 1 year ago

@HaleyRevcat I've already checked this property but this is returning null everytime even though trial offer is attached to the subscription in Google play console.

AlexNsbmr commented 11 months ago

@mohsin-ali-brainx did you finally find the issue ?

xianmueller commented 10 months ago

Also if we do getProduct().getSubscriptionOptions().getFreeTrial() we get null though we have product having a trial period of 7 days and is added correctly on Google Play console under subscription.

I've got the same issue here. My app update got rejected because trial eligibility was shown wrongly (even though this case isn't the 'bad' one, as it gives a trial without informing the user before)