MOVING TO SD CARD

Some of my users (very few) cannot transfer my application to SD CARD. Despite this, they have Android 2.2 and higher, and I included it in the manifest. The "Move to SD" button is disabled. For example, LG Optimus V for Virgin Mobile.

I tested on phones as nexus one, and it works great for Android 2.2 and higher.

I understand that the encoding of the "MOVE TO SD CARD" option is in AndroidManifest.

Android :. INSTALLLOCATION = "Auto"

Is there a third party that is blocking it, or am I missing something.

thank

+5
source share
2 answers

InstallLocation 2.2 (FROYO) , Manifest INSTALL_LOCATION_PROVIDER

+4

Eclipe, " Android", " Android", AVD, , " " , SD- , ": 256 512 1024" , " ", "". "Run Configuration" AVD-, AVD , SD- "".

.

SD-, :

:

1) Android . 2) , , . 3) , SD-:

File sdCard = Environment.getExternalStorageDirectory();

4) , :

File dir = new File (sdcard.getAbsolutePath() + "/folder1/folder2");
dir.mkdirs();
File file = new File(dir, "example_file");

5) "/folder1/folder2" , . , . , "example_file" , .

6) SD-:

FileOutputStream f = new FileOutputStream(file);
Finally step 7:

, Android .

!!!; -)

0

All Articles