Code Monkey home page Code Monkey logo

Comments (5)

RonRadtke avatar RonRadtke commented on July 24, 2024

This is actually due to https://developer.android.com/about/versions/11/privacy/storage
And therefor this is an intended beahviour of newer android versions.
If you want your files to persist use e.g. mediastorage. But then you'll also need a document picker to get access to the files again.
Why do you want files to persist trough reinstallation of the app? The problem is, with reinstalling the app all internal files will be deleted and the app looses access to everything. Also all permissions.

from react-native-blob-util.

valery-lavrik avatar valery-lavrik commented on July 24, 2024

@RonRadtke But after all, I save files to the Downloads folder. That's why I want to access the files again after reinstalling the application. Shouldn't it work?

config({
    fileCache: true,
    indicator: true,
    overwrite: true,
    path: `${DownloadDir}/${file_name}`, // Download folder
    addAndroidDownloads: {
        useDownloadManager: true,
        notification: true,
        path: `${DownloadDir}/${file_name}`,
        description: 'download...',
        mediaScannable: true,
        title: file_name,
    },
})
    .fetch('GET', FILE_URL)
    .then(res => {
        ....
    })

from react-native-blob-util.

RonRadtke avatar RonRadtke commented on July 24, 2024

No it's one of the restrictions of the new scoped storage.
Apps only have access to files in their own internal storage /your app owns. And this one changes whith every install.
And when uninstalling / reinstalling your app looses ownership to all files or, for app internal storage, the files are deleted.

from react-native-blob-util.

valery-lavrik avatar valery-lavrik commented on July 24, 2024

@RonRadtke But then how do applications like total commander work that can open any files in Downloads that are clearly not created by them?

from react-native-blob-util.

RonRadtke avatar RonRadtke commented on July 24, 2024

These applications are using a special permission which allows them general file access. (Manage external storage)
But this one counts as high risk permission and therefor google is strict about apps using it. So you using it could lead to your app not being approved.
https://support.google.com/googleplay/android-developer/answer/10467955?hl=en

from react-native-blob-util.

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.