Btw, on your device go to Manage Applications to see a list of how much
internal storage each app is taking.  This should give you some perspective
on how much space is reasonable.  Also Settings > Storage tells you the
total available and used space on internal storage.

On Thu, Apr 14, 2011 at 11:10 AM, Dianne Hackborn <hack...@android.com>wrote:

> 1MB is perfectly fine to store on internal storage.  There is NO reason to
> avoid internal storage for such a file.  Just write a file there and don't
> worry about it.  For some devices, 10MB may be getting a *little* large...
>  but if this is a temporary file, it shouldn't be an issue.
>
>
> On Thu, Apr 14, 2011 at 1:45 AM, Kacee <komal...@gmail.com> wrote:
>
>> Thanks Dianne... I think I have not put it in write way.
>> In my particular case,
>> SharedPreferences, Database are not applicable due to large file(.xml,
>> html,etc) size
>>
>> My temp files may consume 1MB to say 10MB space. However, app deletes
>> them as soon as they r not needed. Since temp filesize is little more,
>> i am not sure if its a good option to store on device internal
>> Storage. Hence one option left is SDCARD, but there to protect data,
>> encryption needs to be applied...which probably i'll be doing now.
>>
>>
>>
>> On Apr 14, 12:40 pm, Dianne Hackborn <hack...@android.com> wrote:
>> > You are mixing up all kinds of things.
>> >
>> > Each application has a directory on internal storage where its *private*
>> > data goes.  This is shared with all apps on internal storage; there is
>> no
>> > per-app quota, though if the overall storage starts getting low a
>> > notification will displayed to the user which takes them to a list of
>> apps
>> > sorted by how much storage each one is taking, for them to deal with the
>> > culprits.
>> >
>> > SharedPreferences is *one* way to put data in your private internal
>> storage
>> > area.  It is in no way shape or form intended for large amounts of data.
>>  It
>> > is for small settings data.
>> >
>> > Databases are another way to put data in your private internal storage.
>> >  This also is not intended for big blobs of binary data, but works well
>> for
>> > large amounts (megabytes) of structured data.
>> >
>> > Or you can just put whatever files you want in your internal storage, in
>> > whatever format you want.
>> >
>> > The sd card / external storage is generally for *shared* data that does
>> not
>> > need to be protected from other apps.  That said, you *can* protect it
>> > basically as well as you can protect your private data if you do some
>> work
>> > -- for example generate a random key that you put in your internal
>> storage
>> > (so other apps can't get to it) which you use to encrypt the data on
>> > external / sd card storage.  This is basically how apps on SD card works
>> --
>> > the system generates a random key for created encrypted filesystems on
>> the
>> > SD card in which it installs an application.
>> >
>> >
>> >
>> > On Thu, Apr 14, 2011 at 12:17 AM, Kacee <komal...@gmail.com> wrote:
>> > > Yes to avoid memory issues later with preferences, we are storing temp
>> > > files(in MB) on sdcard.... which then crops up problems of encryption/
>> > > file permissions/ etc.
>> > > Aah... we can not expect desktop facilities from a device :)
>> >
>> > > On Apr 14, 11:25 am, Nikolay Elenkov <nikolay.elen...@gmail.com>
>> > > wrote:
>> > > > On Thu, Apr 14, 2011 at 3:07 PM, Kacee <komal...@gmail.com> wrote:
>> > > > > I was wondering if there is any size limit for storing on shared
>> > > > > preferences. Could not find any such info on
>> developer.android.com. Is
>> > > > > anyone aware of such space limit on internal storage ?
>> >
>> > > > Interesting question. Since each app is a different user, you'd have
>> to
>> > > use
>> > > > quotas to do this. I haven't checked, but I doubt Android's kernel
>> has
>> > > support
>> > > >  for this. So unless the frameworks is imposing some restrictions
>> (does
>> > > it?),
>> > > > your xml files can grow until there is internal storage left.
>> Depending
>> > > on how
>> > > > parsing is done, though, you might run into memory problems with big
>> > > > preferences files. You'd better use separate files and/or a database
>> if
>> > > you
>> > > > need to store a lot of data.
>> >
>> > > --
>> > > 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+unsubscr...@googlegroups.com
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/android-developers?hl=en
>> >
>> > --
>> > Dianne Hackborn
>> > Android framework engineer
>> > hack...@android.com
>> >
>> > Note: please don't send private questions to me, as I don't have time to
>> > provide private support, and so won't reply to such e-mails.  All such
>> > questions should be posted on public forums, where I and others can see
>> and
>> > answer them.
>>
>> --
>> 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+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to