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 flows, 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 flow or paywall, and access the local onboarding configuration.
-
If the application cannot access the internet:
It will be able to display a fallback flow or 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
- Move the fallback configuration file to the
assetsorres/rawdirectory of your Android project. - Call the
.setFallbackmethod before you fetch the target flow, paywall, or onboarding.
Parameters:
| Parameter | Description |
|---|---|
| location | The FileLocation object for the fallback configuration file |