How to force Android to install an app to internal memory

I have an application that I download from a private server, it installs on most phones, but I am having problems installing it on HTC Desire C. The phone does not have an SDK. I searched around and found a manifest parameter that should hint at internal storage, or say at least no preference where the app is installed.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.carefreegroup"
    android:versionCode="1"
    android:versionName="1.0"
    android:installLocation="auto" >

      

However, this doesn't work.

How can I tell Android that the MUST app will be installed in internal memory

Thanks Matt

+4


source to share


3 answers


set in manifest

android:installLocation="internalOnly"

      



this will install the app to internal storage and won't install it at all if there is no space in internal storage

http://developer.android.com/guide/topics/manifest/manifest-element.html

+7


source


The android: installLocation attribute can have the following possible values.

internalOnly: The app should only be installed on an internal device. If this is installed, the app will never be installed on external storage. If the internal storage is full, the system will not install the app. This is also the default behavior if you don't define android: installLocation.



auto . The app can be installed to external storage, but the system will install the app to internal storage by default. If the internal storage is full, the system will install it to the external storage. After installation, the user can move the application to internal or external storage through the system settings.

preferExternal: The app prefers to install to external storage (SD card). There is no guarantee that the system will fulfill this request. An app can be installed to internal storage if the external media is unavailable or full, or if the app uses a direct locking mechanism (not supported on external storage). After installation, the user can move the application to internal or external storage through system settings.

+2


source


According to the docs , if you don't set this preference, the app will be installed on internal storage and it won't roam.

+1


source







All Articles