Hello RevenueCat, We switched to RevenueCatPaywall system.
It was working correctly and still is working most of our users, but paywall isn't displaying in 2 test device.
When opening the Paywall, we send the information to MixPanel with an event whether it was displayed successfully or not.
936,000 users were able to successfully view the paywall, but 156 users were unable to open it. We're requesting assistance with this issue.
I am sending you the code we used to open Paywall below:
private fun launchPaywallActivity() {
lifecycleScope.launch {
delay(200)
Purchases.sharedInstance.getOfferingsWith(
onError = { closeWithResult() },
onSuccess = { offerings ->
offerings.current?.let { currentOffering ->
assignedOffer = currentOffering
val launcher = paywallActivityLauncher
if (launcher == null) {
closeWithResult()
return@getOfferingsWith
}
launcher.launchIfNeeded(
requiredEntitlementIdentifier = "our_identifier_is_here",
offering = currentOffering,
paywallDisplayCallback = object : PaywallDisplayCallback {
override fun onPaywallDisplayResult(wasDisplayed: Boolean) {
analyticsFacade.trackEvent(AnalyticsEvent.RCPaywallDisplayed(isSuccessful = wasDisplayed))
if (!wasDisplayed)
closeWithResult()
}
}
)
} ?: closeWithResult()
}
)
}
}
