Pinsickle
Pinsickle

Reputation: 633

Change permissions of file in the download folder

Is it possible to change the permissions for files saved in the generic download folder? (i.e. where the browser sends downloads.) I've tried to use the file methods setReadable and setWritable to make the files I've downloaded viewable but the method returns false. I'm assuming this is because I don't have root access.

If the user uses a file explorer directly on the phone they can see the files, but if they hook their phone to the computer the files cannot be seen.

Thanks in advance.

Upvotes: 0

Views: 1459

Answers (2)

CommonsWare
CommonsWare

Reputation: 1006674

I've tried to use the file methods setReadable and setWritable to make the files I've downloaded viewable but the method returns false.

Perhaps you did not index them with MediaScannerConnection, or perhaps your computer caches the results of the MTP connection to the device.

Upvotes: 1

null
null

Reputation: 807

Some file systems including SD cards do not allow permission changes. The generic download folder most probably is on one of that kind.

Try changing the USB computer connection to Mass storage, that should fix the problem.

Upvotes: 1

Related Questions