开发者

Installing apk Files to device sd-card

When a us开发者_开发百科er installs my application I want to install my apk files to the devices SDCARD.

I saw the source code for PackageManagerService.java, I can update the install location, but I'm not sure I should be changing that code.


I think should help you:

App Install Location (developer.android.com)

To quote:

Beginning with API Level 8, you can allow your application to be installed on the external storage (for example, the device's SD card). This is an optional feature you can declare for your application with the android:installLocation manifest attribute. If you do not declare this attribute, your application will be installed on the internal storage only and it cannot be moved to the external storage.

To allow the system to install your application on the external storage, modify your manifest file to include the android:installLocation attribute in the <manifest> element, with a value of either "preferExternal" or "auto". For example:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜