I have an app that accesses audio files through the MediaStore API. I'm using a minSdkVersion of 16 and a targetSdkVersion of 30. When I query the MediaStore, my projection array includes MediaStore.Audio.Media.DURATION. Android Studio attaches a warning message to this, "Field requires API level 29". If I ignore the warning, and run my app anyway on a legacy device with API level 16 or 19, the app runs fine, and the durations it returns are correct.
If the DURATION attribute was only added in API 29, how come it doesn't generate an error on older devices? What is the downside to continuing to ignore the warning?