Tuesday, April 9, 2013

[android help] When to delete file shared with external apps by content provider


In my application I allow users to share files with external apps by using content provider. My files are encrypted so before I can share one of those files, I need to decrypt it and store it in application internal storage. After that I implemented custom content provider that can point to the file by using a given URL and return ParcelFileDescriptor instance.


For security issues I would like to remove the file from internal storage after external application has used it, or user canceled operation.


So my question is: When should I remove the file, or do you know of any event that I can listen to or a handler that I can attach to the file?


Thank you for all you responses.


Side question would be: Do you know of a way where I wouldn't have to store the file on internal storage, but rather send it directly as a stream to the external app?



.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...