Android 11 introduces various privacy changes including scoped storage. This implies that on Android 11 or higher, the app no longer
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
But I still need to maintain the feature on Android 10 or lower. Is it possible to declare Manifest permissions and attributes depending on the SDK version?
See here :
android:maxSdkVersion
So your
maxSdkVersion
would be28
(as apps on Android 10/ API level 29 or up don't need to request it). Your question mentions Android 11 but reading the documentation it seems its allowed from Android 10 and up.