Android - Use fallback paywalls

Fallback paywalls are supported by Android SDK v2.11 and later.

To maintain a fluid user experience, it is important to set up fallbacks for your paywalls and onboardings. This precaution extends the applicationโ€™s capabilities in case of partial or complete loss of internet connection.

  • If the application cannot access Adapty servers:

    It will be able to display a fallback paywall, and access the local onboarding configuration.

  • If the application cannot access the internet:

    It will be able to display a fallback paywall. Onboardings include remote content and require an internet connection to function.

Before you follow the steps in this guide, download the fallback configuration files from Adapty.

Configuration

  1. Move the fallback configuration file to the assets or res/raw directory of your Android project.
  2. Call the .setFallback method before you fetch the target paywall or onboarding.

Parameters:

ParameterDescription
locationThe FileLocation object for the fallback configuration file