Skip to main content
Question

Custom alert dialog with Paywall and PaywallFooter


Forum|alt.badge.img+3


Hi! I am setting up the new paywall for an android app, and I like how it goes so far, however one thing throws me off - Revenue Cat automatically shows AlertDialogs not styled accordingly and with non user-friendly error messages. I would want to be able to show completely custom dialogs for each needed usecase with my own styling and wording. (The one you see on the attached screenshot is for example when the internet connection is turned off).

The listener provided to paywall is not invoked in any of the callbacks. i.e. onPurchaseError is not called etc. I would want to either pass custom dialogs to the paywall or just handle all these cases via callbacks myself.

please let me know if it’s possible and i’m missing smth.

Additionally as you can see on a screenshot I am using a custom overlay for the back button and “Redeem code” button. And I would want to disable these when there’s an operation in progress. However I don’t believe that the paywallexposes such isInProgress and isLoading status anywhere
 

6 replies

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 432 replies
  • January 12, 2024

Hi, at this time custom error handling is not available. We understand that this is not ideal, but please know that our paywalls team is aware of this issue and is actively working on improving this error handling experience. I can update here once progress has been made.


Forum|alt.badge.img+3
  • Author
  • New Member
  • 1 reply
  • January 14, 2024

Thank you for the response, will be waiting for updates on this


Forum|alt.badge.img+1
  • New Member
  • 1 reply
  • August 16, 2024

Hi, is there any update or progress on this. I mean it really looks off with respect to entire design. You could have just passed the error in callback and developers would have handled it


Hello! Is there any update on this?


Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 370 replies
  • December 13, 2024

Our error dialogs should be styled now. Which SDK/version are you using?


Hi ​@Ryan Glanz,

I’m experiencing the same issue with the integration of PaywallFooter into my Android app. Could you let us know if there’s a recommended approach to fully suppress the default error dialogs from PaywallFooter?


Environment:

  • Multiple Android devices (various OS versions)
  • RevenueCat Android SDK: 8.10.7, 8.10.8, 8.11.0

Code Snippet:
 

PaywallFooter(

    options = PaywallOptions.Builder(dismissRequest)

        .setFontProvider(CustomFontProvider(FontFamily.SansSerif))

        .setListener(object : PaywallListener {

            override fun onPurchaseError(error: PurchasesError) {

            }

            override fun onPurchaseCancelled() {

            }

        })

        .build()

    ) {

    PaywallContent()

}


Steps to Reproduce:

  1. Open the paywall screen in the app
  2. Turn off internet connection
  3. Tap the CTA and wait for the “No internet connection” Google Play dialog
  4. Close the Google Play dialog

Expected Result: “Error performing request” is not displayed, and PaywallListener.onPurchaseError callback is invoked
Actual Result(screenshot is attached): “Error performing request” dialog is displayed, and PaywallListener.onPurchaseError callback is invoked
Logs:
😿‼️ PurchasesError(code=NetworkError, underlyingErrorMessage=Unable to resolve host "api.revenuecat.com": No address associated with hostname, message='Error performing request.')
🤖‼️ Error fetching offerings - PurchasesError(code=NetworkError, underlyingErrorMessage=Unable to resolve host "api.revenuecat.com": No address associated with hostname, message='Error performing request.')
Can't get address: null : java.lang.RuntimeException: Geocoder error: gspy: UNAVAILABLE
Can't get address: null : java.lang.RuntimeException: Geocoder error: gspy: UNAVAILABLE
Can't get address: null : java.lang.RuntimeException: Geocoder error: gspy: UNAVAILABLE
...


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings