gpt4 book ai didi

Android:默认在 SD 卡上安装我的应用程序

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:17:58 25 4
gpt4 key购买 nike

希望我的问题从标题中清楚。我还是会解释的。有什么方法可以将我的应用程序直接安装到 SD 卡上,而无需先存储在手机内存中。因为我的应用程序很大。或者有没有办法向用户提供“移动到 SD 卡”选项以手动移动。如果是,我该怎么做?感谢您的回答。

最佳答案

来自谷歌:

App installation on external storage media The Android platform now allows applications to request installation onto the device's external storage media (such as the SD card), as an alternative to installation onto the device's internal memory.

Application developers can express the preferred installation location for their applications by means of a new attribute of in the manifest file, android:installLocation. The attribute supports three values: "internalOnly", "preferExternal", and "auto". At install time, the system checks the value of android:installLocation and installs the application .apk according to the preferred location, if possible. If the application has requested external installation, the system installs it into a private, encrypted partition in the external media. Once an application .apk is installed externally, the system lets the user change the storage location of the .apk and move it onto the device's internal memory if needed (and vice versa), through Manage Applications in the user settings.

By default, the system installs all applications onto the device's internal memory, except for those that explicitly request external installation. This means that the system will always install legacy applications onto internal memory, since they do not have access to the android:installLocation attribute. However, it is possible to configure and compile a legacy application such that it is installed internally on older versions of the platform and externally on Android 2.2 and later platforms, if necessary.

Note that requesting installation onto the device's external media is not suitable for all applications, particularly because the external media may be removable and unmounting/remounting may disrupt the user experience and system settings.

For more information about setting a preferred install location for your application, including a discussion of what types of applications should and should not request external installation, please read the App Install Location document.

关于Android:默认在 SD 卡上安装我的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4355296/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com