I am developing an Android application using Jetpack Compose, which incorporates heavy animations and Lottie files. The app runs smoothly on high-performance devices like the Pixel 6 or 7. However, I aim to optimize the app's performance on lower-end devices by disabling these heavy animations and replacing Lotties with static images.
What would be an effective strategy to conditionally enable or disable these resource-intensive animations based on the actual device performance?
Initially, I considered using the Android API level as a metric for determining device performance. However, many new devices with the latest Android API (13) still exhibit poor performance.
The official Android documentation mentions the Performance Class Standard