israeltrejo commented on issue #426: URL: https://github.com/apache/cordova-plugin-file/issues/426#issuecomment-924519379
> > I changed the android version in which the application is focused adding this tag in the config.xml: > > `<preference name="android-targetSdkVersion" value="28" />` > > And this change allows to save files into the device using on Android 8, Android 9, Android 10 and Android 11. > > I did tests on Android emulator and physical devices working correctly. > > The Android documentation recommends to change the API Level version to avoid the scoped storage feature on Android 10. > > You get more information about scoped storage feature here: > > https://developer.android.com/training/data-storage/use-cases#opt-out-scoped-storage > > I hope this information will be helpful. > > This isn't a solution to anybody who wants to publish to the Google Play store as they require the target SDK to be set to >= 30. You're right, it is necessary set API Level to 30 for Play Store but I forced the API Level to 30 testing again in Android 8, 9, 10 and 11 and everything worked fine. This is the preference tag: `<preference name="android-targetSdkVersion" value="30" />` Also, I tested that an application with this tag could be uploaded to Play Store Console and the file was accepted. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
