android - When to delete file shared with external apps by content provider -


in application allow users share files external apps using content provider. files encrypted before can share 1 of files, need decrypt , store in application internal storage. after implemented custom content provider can point file using given url , return parcelfiledescriptor instance.

for security issues remove file internal storage after external application has used it, or user canceled operation.

edit: external application sharing file 3rd party application.

so question is: when should remove file, or know of event can listen or handler can attach file?

thank responses.

side question be: know of way wouldn't have store file on internal storage, rather send directly stream external app?

the answer question use pipes parcelfiledescriptor.

code described in busy coder's guide android development commonsware.

the solution based on: https://github.com/nandeeshwar/pfd-create-pipe

actual solution managed implement is: https://github.com/commonsguy/cw-omnibus/tree/master/contentprovider/pipe


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -