Search code examples
androidsd-cardandroid-sdcard

running on an SD card issue


I recently modified all my apps to run on an SD card by specifying android:installLocation="preferExternal" in the Manifest.xml. They tested out just fine on all my test phones.

It seems like a no-brainer for an app to allow this. But I notice that most of the apps on my phones do not allow running on an SD card. Google Chrome, Google Earth, Dropbox, Google Gmail, GolfNow, etc. In fact none of the Google apps will run on an SD Card.

I'm trying to find out why. What is the downside of running on an SD card? Thanks, Dean


Solution

  • This is actually a broad question and you'd really have to ask the developers of those apps to get a definitive answer.

    Some ideas...

    • External storage as it's traditionally known was usually provided by plug in SD cards. An SD card can, of course, be dismounted and/or physically removed by the user meaning none of the apps installed on it will work until it is reinserted.
    • Certain types of RAM chips have much faster access times than others. Internal RAM on a device might be better suited for processor / computational intensive apps than that of accessing SD cards which tend to have slower access times both at the RAM chip level and also due to having to go through an external bus.
    • Mission critical apps (depending on the users' defination of what they should be) need to be accessible permanently (see my first point). If a user wants their email to be retrieved at short, fixed intervals, their email app can't be allowed to disappear because the external storage has been dismounted / removed.
    • There are known problems with some app requirements which cause unpredictable results when the app is installed on an SD card. A classic example is any app which registers a BroadcastReceiver to receive the BOOT_COMPLETED action. Boot completion happens BEFORE various parts of a device are up and running - this includes mounting the SD card. In this scenario, the broadcast is sent but the apps on the SD card aren't running and can't receive it.
    • As time has gone on, so called 'internal' and 'external' storage definitions have become increasingly blurred - in comparison to several years ago, many Android devices have huge amounts of 'internal' memory making it less important to free up space by installing or moving apps to 'external' storage. Some devices don't even have the ability to add an external SD card and 'external' storage is emulated from a partition on the 'internal' storage.
    • One other point (tongue in cheek) - perhaps the developers of the apps you mention are egomaniacs and just insist on using up precious 'internal' storage just because they can. ;)