Как я могу создать путь к каталогу и поместить мои файлы в него при установке apk? - PullRequest
0 голосов
/ 20 сентября 2011

Как я могу создать путь к каталогу и поместить в него мои файлы при установке APK? (При установке apk; не при запуске программы).

1 Ответ

0 голосов
/ 20 сентября 2011

Невозможно вносить изменения во время установки приложения.единственное, что происходит, - это когда вы работаете.

Для установки apk на внешнее хранилище,

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

и запомните,

When your application is installed on the external storage:

1.There is no effect on the application performance so long as the external storage is
mounted on the device. 


2.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 device
memory. 

3.The unique container in which your application is stored is encrypted with a randomly
generated key that can be decrypted only by the device that originally installed it.
Thus, an application installed on an SD card works for only one device. 


4.The user can move your application to the internal storage through the system
settings.

Warning: When the user enables USB mass storage to share files with a computer or
unmounts the SD card via the system settings, the external storage is unmounted from
the device and all applications running on the external storage are immediately killed.
...