android - Prevent users to view/delete file in sdcard -
i have internal app can distributed company's users.
the admin can put file device in specified folder in sdcard don't want users can view/delete it. best way/concept achieve it? have tried researching still don't find solution.
i'm not sure it's possible. user can take sd card out, put card reader , view/delete way. if app relies on preventing access file on sd, i'd design flawed.
according android documentation, should store private data in internal storage , store public data in external storage - have @ storage options documentation more info.
if require store/read files users shouldn't able access other through app, should store these files in local directory app (which under /data/data/your.app.package
). use openfileinput
, openfileoutput
methods on context
read/write such files.
Comments
Post a Comment