Closed eddsaura closed 2 years ago
Add this in config.xml
`
</edit-config>`
I solved it after adding this code
Add this in config.xml
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:requestLegacyExternalStorage="true" /> </edit-config>
I solved it after adding this code
Hey, thanks for replying. There is one problem with my post, I had Cordova 9 with Android 8, aparently the requestLegacyExternalStorage can only be used with Cordova 10 and Android 9, and also we had to install a plugin called cordova-androidx-support or something like that, after all of that we were allowed to use requestLegacyExternalStorage into the manifest!
Now it is working with my android10, now I have to test with older smartphones hehehe....
Add this in config.xml
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:requestLegacyExternalStorage="true" /> </edit-config>
I solved it after adding this code
Hey, I am facing the same issue too I have tried this but still I am facing the same error while uploading a file to my server. Can you send me the steps clearly so that I can check or update you whether I have done in the right way or not. Thanks in advance
I changed the android version in which the application is focused adding this tag in the config.xml:
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.
Good evening cordova fellas,
We are having some problems with photolibrary at saving an image.
I thought it was the way of asking for the permissions by photolibrary.
At first I had this:
So I decided to use AndroidPermissions to try to fix this, so now, when I start the app it just checks the permissions. In case we don't have android.permission.WRITE_EXTERNAL_STORAGE we just ask for them. Ok...
This is the function:
I wrote this function with WRITE_EXTERNAL_STORAGE because here in the repo you suggest to add this to the config.xml. Thing is that I can't make it work this way, I don't know why.
Ok so.. Any idea?
Thanks a lot!