By default, your application will be installed on the internal storage of a device. However, this default behavior can be changed. When you have a big Android application that requires many megabytes on a phone's space and is not tightly integrated with the system, installing it on the external storage of the phone is a good idea as it saves space on the internal storage of the phone. This feature is only available for a device running API Level 8 (Android 2.2) or greater. To tell the system to install your application on the external storage rather than the internal storage, you need to modify the AndroidManifest.xml file to add the android:installLocation attribute with the value of "preferExternal". This attribute is placed in the
<manifest> tag. Here is an example:
The system will install the application in the external storage if it is not full. Otherwise, the application is installed in the internal storage. The user can also move your application between the two locations. Note that when your application is installed on the external storage, the .apk file is saved on the external storage, but all private user data, databases, optimized .dex files, and extracted native code are saved on the internal storage.
Posted by: Dara | post date: 08-30-2014 | Subject: Android Apps Development
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: