Code Monkey home page Code Monkey logo

Comments (4)

drop0118 avatar drop0118 commented on August 22, 2024

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

from cordova-plugin-photo-library.

eddsaura avatar eddsaura commented on August 22, 2024

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....

from cordova-plugin-photo-library.

VrVkr avatar VrVkr commented on August 22, 2024

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

from cordova-plugin-photo-library.

israeltrejo avatar israeltrejo commented on August 22, 2024

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.

from cordova-plugin-photo-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.