Tuesday, June 21, 2011

Re: [android-developers] Queries on Internal Storage - device space

On Tue, Jun 21, 2011 at 6:42 AM, Kacee <komal016@gmail.com> wrote:
> I explored storing temp/supporting files on Internal storage i.e.
> SharedPrefs (private to app) and Internal Storage of device. Now, when
> i try to create a file on Internal Storage, it by default creates and
> stores file on </data/data/<app_home>/files/ . My intent was to store
> a file on some centrally located area i.e some device storage path
> which is accessible to all applications, and whose file permissions
> can be restricted using different modes like we have as -
> MODE_PRIVATE, MODE_WORLD_READ,etc.
>
> Quesn is : Is there a way to create a file on such centralized storage
> location (if it exists on android device) so that it is accessible to
> multiple apps ?

Only on external storage. Not on internal storage.

> Or provide a path while creating file using
>
> FileOutputStream fos = openFileOutput(FILENAME, Context.<MODE>);

No, you cannot supply a path here.

Savvy programmers create components that expose an API (service,
content provider) that help provide security and process
synchronization to the data. Apps sharing data by files is *so*
1980's.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment