0

I stumbled upon samsung Knox app the other day. It seems to creates a separate container inside phone storage which can only be accessed by that app. I wanted such behavior in my app (other than adding '.' before the file name).

S.O results like these Create a read-only folder in sdcard in android say thats not possible..

Can anyone tell me briefly what are the possible ways of achieving such "hide(secure) ur files" behavior in my app (other than adding a '.' before filename).

thanks in advance.

Community
  • 1
  • 1
Sam
  • 105
  • 2
  • 14
  • 1
    Are you building your own custom ROM, as Samsung did, and are looking to add this feature to your ROM? – CommonsWare Nov 08 '15 at 16:25
  • For a folder to be accessible to your app only, create it in your app private space. – Phantômaxx Nov 08 '15 at 16:26
  • @FrankN.Stein if i create a folder in my apps private space - it will get deleted on app uninstall. http://stackoverflow.com/questions/1221534/require-a-password-to-uninstall-remove-application that will lead to data loss despite certain measures – Sam Nov 08 '15 at 16:36
  • If so, then use a server, accessible by your app given your credentials. – Phantômaxx Nov 08 '15 at 16:49

1 Answers1

2

S.O results like these Create a read-only folder in sdcard in android say thats not possible

That is because it is not possible.

I stumbled upon samsung Knox app the other day. It seems to creates a separate container inside phone storage which can only be accessed by that app.

That is part of Samsung's KNOX APIs, then. That is not possible in standard Android by standard Android SDK apps.

I dont want to store them in the apps folder (as they are automatically deleted on uninstall)

The user can delete whatever the user wants on the user's device, as it is the user's device, not yours. You have no means of stopping this, other than by not having the data on the device in the first place.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491