Android install app on external storage

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:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   android:installLocation="preferExternal">

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

write programming tip



This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.

© 2014 worldbestlearningcenter.com