[TIMOB-2957] Android: Expose MODE_WORLD_READABLE
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2013-01-14T10:35:31.000+0000 |
Affected Version/s | Release 1.6.0 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Dawson Toth |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:33:43.000+0000 |
Updated | 2017-03-22T17:22:38.000+0000 |
Description
Problem
On the incredible there is no external data storage so when I wrote a file I need the ability to set the privilege on it so it can be accessed by another activity not belonging to my app (Context.MODE_WORLD_READABLE).
Solution
Expose MODE_WORLD_READABLE through the Ti.Filesystem module on Android. I will ask the enterprise client to post more information on their preference for this exposure.
Associated Helpdesk Ticket
http://appc.me/c/NCI-43191-678">http://appc.me/c/NCI-43191-678
Adding some kind of permission property on to the object Titanium.Filesystem.File would work for me. Thanks!
Any chance we can get this moved into 1.7?
Opie, this needs to be considered for our spec as appropriate. I'm assigning it to S12 so that it can scoped wrt the spec. We will do the work once the spec has been approved. Please move it back into the new state once you update the spec and this ticket with any pertinent information.
This item was taken into consideration for the stream spec and should be moved to another milestone I think where it can be grouped with the stream implementation. Assigning back to Don for placement.
Need use and repro case for this to move forward.
Updated example from helpdesk ticket. It is possible to successfully run the updated example without this fix on a device that does not have an sd card. Must have a pdf reader installed, Adobe Reader for example.
Tested with
TiSDK 1.7.3.v20110826161351 Nexus S, 2.3.4When developers explicitly create files (via the documented Ti.Filesystem.createFile), let them pass in an argument for mode world readable. That would address this issue. If they want to make a file world readable that already exists, their JavaScript can copy it in to a new file that has been created properly.
TypeError: Object File has no method 'createFile' (tested with Nexus S Android 4.0.3, Ti SDK 1.8.1) Would be useful to have this feature. Am I doing it wrong or is this just not resolved yet? Any update on the status would be much appreciated.
Found this link: http://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE Google has deprecated this constant since API Level 17 and the use of this constant is strongly discouraged due to certain security issues as mentioned in above link.
Shak, please look at my accepted answer on that Q&A. The code you've pasted won't help you, and it's already fixed in platform.
Marking as won't fix based on Varun's link.
"Won't fix" doesn't help the customers very much. This is a legit issue for them, and "mode_world_readable" was only one solution. Based on the link and my very limited understanding, the customer would need to be able to create their own ContentProviders. Right? Or, someone could write a module (ie the module team) that exposes a static file ContentProvider. The app inits the module with a directory, and we're off.
It doesn't matter to me. If it matters to Shak, he can do so.
Closing ticket as the issue will not fix and with reference to the above comments.