0

For an application in development the main bulk of users are required for their tablets to be running restricted users so that they are incapable of using the device for anything more than the job they are tasked with.

When running normal testings getting the database out of the system and emailing it is going fine, but as soon as a restricted user attempts the same function an error is reached:

libcore.io.ErrnoException: open failed: EACCES (Permission denied)

File dbFile = new File(Environment.getDataDirectory() + "/data/com.fusi.vticket/databases/vt_data.db");

As seen by it working outside of restricted users I have all the correct permissions needed for a usual user to have access to these files.

Is there a specific way of allowing Restricted Users access to the same file structures as unrestricted or am I stuck with a dead solution?

Thanks for any time and help spent with this issue!

Kitty Katie
  • 43
  • 1
  • 7

1 Answers1

0

please add the permission for Allows an application to write to external storage.

Allows an application to read from external storage.

Any app that declares the WRITE_EXTERNAL_STORAGE permission is implicitly granted this permission.

This permission is enforced starting in API level 19. Before API level 19, this permission is not enforced and all apps still have access to read from external storage. You can test your app with the permission enforced by enabling Protect USB storage under Developer options in the Settings app on a device running Android 4.1 or higher.

AndDoc
  • 1