Search code examples
androidandroid-install-apk

Can i upload my apk to SD Card instead of internal storage?


My APK is big, 70 MB. I don't have any problems when I install it in external storage, but when I upload it to phone before installing, the APK goes to internal storage and my testing phone doesn't have enough space in internal storage and a lot of android phones don't have enough internal space for 70 MB...

Can I upload my APK straight to the SD Card instead of internal storage first?


upload mean "upload from my eclipse while runnig , or download from market, apk will go to internal storage but i want apk go to external and start install from external"


Solution

  • you can install your app on sdcard by using installation location tag in manifest.. below is more detail

    SD-card installation is an optional feature on Android 2.2, is under the control of the developer not the user, and will not affect any applications built prior to Android 2.2.

    Application developers can set the field android:installLocation in the root manifest element to one of these values:

    internalOnly: Install the application on internal storage only. This will result in storage errors if the device runs low on internal storage.

    preferExternal: The android system tries to install the application on external storage. If that is full, the application is installed on internal storage.

    auto: Let the Android system decide the best install location for the application. The default system policy is to install the application on internal storage first. If the system is running low on storage, the application is then installed on external storage.

    here is reference doc >> docs