Migrate Adapty Android SDK to v4.4
To update your app from Adapty Android SDK 4.1, 4.2, or 4.3 to 4.4, set the adapty-bom version to 4.4.0, and replace the fallback file in the same build. SDK versions 4.1–4.3 reject the new file. An app on 4.0 needs the v4.1 changes first.
The fallback file format changed in 4.4, and the compiler can’t detect an outdated file. Without a new fallback file, every placement loses its fallback.
Replace the fallback file
To download the fallback file again, in Placements, click Fallbacks > Download Android Fallback. In the Adapty SDK v4.4.0 and higher row, click Download. Bundle the file in your app.
The downloaded file is named android_4_4_0_fallback.json. Give it the name of the file that your app loads, or update the name in the call that loads it:
FileLocation.fromAsset: The file name, such asandroid_fallback.json.FileLocation.fromResId: The resource name, such asandroid_fallbackinR.raw.android_fallback.
With an outdated file, Adapty.setFallback passes an AdaptyError to its callback, with the message “The fallback file version is not correct. Download a new one from the Adapty Dashboard.” To verify the new file, run the app, and make sure that this callback receives no error. The callback is optional. Without it, set the log level to AdaptyLogLevel.ERROR or a more detailed level. Then make sure that Logcat doesn’t show this error.