简体   繁体   中英

How to give temporary access to some files on internal storage to other applications?

I have application A and application B, than I have some file on the A application and I want to make the file available for app B. The file is in the internal storage in the private app data. What should I do ? Is there some permission to give to the file ? is there some specific way of creating intents ???

how does work the process for these kinds of files, I mean if it was a file in the sdcard would be very easy ....

You need to use a Content Provider in your app.

From the Android Dev page:

Content providers store and retrieve data and make it accessible to all applications. They're the only way to share data across applications; there's no common storage area that all Android packages can access.

Of course, Application B will need to be aware of your provider and able to use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM