My paywall has dynamic terminology for if the user has access to a 7 day free trial or not and I want to determine if the user is eligible for the free trial offer I have setup for my subscription on ios and android.
My app is built in react native and I’m using the react-native-purchases library from RevenueCat.
I know for IOS I can use the
const eligibility = await Purchases.checkTrialOrIntroductoryPriceEligibility(["myPackage"]);
but for Android this isn’t available/doesn’t work.
For Android can I fetch the offerings and check the introPrice field in the product and if it isn’t null I can assume that they’re eligible to use the free trial ?
const offerings = await Purchases.getOfferings();
const annualPackage = offerings.all["myPackage"]?.availablePackages.find(pkg => pkg.packageType === "ANNUAL");
if (annualPackage && annualPackage.product.introPrice != null) {
setFreeTrial(true);
}