How to confirm the installation location of an application

Source: Internet
Author: User

Some applications can be installed on the SD card, but some applications cannot. There are certain rules. How to judge?
6575/6577/6589 Android GB2, ICS, ICS2, JB, JB2
[Solution]
Google's default PackageManager management installation package mechanism is as follows (from high to low according to the description of priority, if the high priority conditions are met, do not continue to refer to the lower priority options ):
1. to install the application to the SD card, you must specify install flag: adb install-s ***. apk
This setting has the highest priority. The final installation result is subject to this, regardless of the following two configurations.
2. If the install flag in "1" is not specified, the android: installLocation definition in AndroidManifest. xml is checked.
Set the score of manifest:
Android: installLocation = "auto" indicates to check whether the phone memory is sufficient. If the phone memory is sufficient, it is installed on the T card;
Android: installLocation = "internalOnly", indicating that the device is installed on the phone memory;
Android: installLocation = "preferExternal", indicating to be installed on the T card;
3. If installLocation is not defined in AndroidManifest. xml, refer to "Settings"-"Storage"-"preferred installation location"
The preferred installation location has three options: determined by the system, mobile phone memory, and mobile phone storage.
 
Note: The "preferred installation location" is disabled by default, and we do not recommend that you enable it. Some applications google will be installed in the mobile phone memory by default. If the application is installed on the SD card due to this "preferred installation location", the cts test may fail.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.