Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6948711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:51:31+00:00 2026-05-27T13:51:31+00:00

I’ve read this Android save app settings/data in Internal/External Storage but I don’t think

  • 0

I’ve read this Android save app settings/data in Internal/External Storage but I don’t think i’ve really got an answer.

I’m developing an app where I should store some “cache” data, like a dozen of images and some strings (json).

Initially I was storing all that on the sdcard, (external storage) but later i thought that this could be deprecated by the SDCard deprecation in most recent devices.

After reading a bit, I understood that external storage is not only sdcard, but “a removable storage media (such as an SD card) or an internal (non-removable) storage” so it should not be deprecated but…it’s shared space, and there is not ownership over the files stored there, so the first problem was that I was unable to delete them when the app was deleted.

So I changed to the Internal Storage, to avoid having the files/images “public” and also having them removed after app deletion.

Is this the recommended approach?

On devices older with low internal storage but with a lot of space in the SDcard is this a good approach?

My application supports from 1.6 to 4.0 (so far) so I have a lot of legacy devices… and I must have the app working (well) on all.

Looking forward for some interesting answers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:51:32+00:00Added an answer on May 27, 2026 at 1:51 pm

    It depends on the type of data you are wanting to store.

    You mention it’s cached data so myassumption is that it should not matter if for some reason it all disappears. This leads me to believe that you should be using the getCacheDir(). In this case the system will remove files if the cache becomes too big so devices with low internal storage shouldn’t present a problem (although it is recommended to manage this your self anyway), it’s relatively secure and it will be managed by the app so if there is an uninstall it will be removed.

    getExternalCacheDir() was introduced in 2.2 so isn’t any use to you unless you would like to detect the version and switch between the 2 caching directories getExternalCacheDir() doesn’t provide security so data could be accessed by anyway with access to the SD card. The only reason I could think you might want to do this is because of size of cache you desire but from your description the data doesn’t seem excessive.

    UPDATED from comment:

    although this is a specific case where it’s cache…but I don’t want
    it to be deleted whenever the system wants. It’s the kind of cache
    that I need the to app decide when to purge. What is the main concern
    of storing in on “normal” internal storage without being on the cache
    dir?

    If you get to the stage where the system is cleaning up internal cached data because storage is so low then you should probably leave it to clean up this sort of app data. By using standard internal data storage you are bypassing this safe guard which would probably create more unpleasant problems than having app data deleted.

    If your data is of high importance then I would suggest trying to identify specific data that is more important and managing that separately. If this data you identify needs to be secure then internal storage using files or a db (depending on the data type) seems like your only real option but you would have to be wary of this data building up.

    UPDATED from comment

    What do you think about using SharedPreferences to save string data?
    Is there a limit on SharedPreference string saved size? Is it a (good)
    possibility?

    I have used shared preferences to store relatively big json strings in the past with no problem, I find it’s simpler than using the databases for primitive data types (and strings) where there are limited values to save. However when you have images or lot’s of values, management becomes more complex. Also you will have the same problem as you would with standard internal storage in terms of storage space.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to construct a data frame in an Rcpp function, but when I
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.