Alibabacloud.com offers a wide variety of articles about android move data to sd card, easily find your android move data to sd card information here online.
If you use Google's own simulator or the real machine debugging, the SD card directory is/mnt/sdcard. This is a belief that we all know.but today with Genymotion debugging, found at all not open/mnt/sdcard This directory, at that time also did not pay attention to other information, think is adb, eclipse what problem, After restarting them still can't open, after a struggle, found an important clue! Oh, it
If you want to use SD card during development, you must specify
There are two ways to create an SD card. One is to directly enter the size to be created and the ADT is automatically created. The other is the image file of the specified sdcard.
Use the mksdcard.exe tool in sdkto create an image file for sdcard. For
Step one: Turn on your computer's data-dog data recovery software, enter the main interface of the software, select the "delete recovery" mode, as shown in the following figure.
The second step: in the Region 1 selected SD card, click on the Region 2 key to enter the d
Read the SD card file information and add it to the listview to display it:
Listview obtains the information of the SD FileCode:
List
Draw different images based on filetype:
Public long getsdtotalsize () {/* Gets the memory card path */File sdcarddir= environment.getexternalstoragedirectory (); /*statfs See File system space Usage */StatFs statfs=new StatFs (Sdcarddir.getpath ()); Long blocksize= Statfs.getblocksizelong (); Long Totalsize=statfs.getblockcountlong (); return blocksize*totalsize;} /** * Get the remaining capacity of SD
.
Propertyconfigurator. getconfigurator (this). Configure ();
4. Put the microlog. properties file in the assets folder.
Note: The assets folder is the same as the res folder.
Then change the microlog. properties file to the following:
Microlog. Level = debugMicrolog. appender = logcatappender; fileappenderMicrolog. formatter = patternformatterMicrolog. formatter. patternformatter. pattern = % C [% P] % m % t
5. Write log records
Logger. debug ("My debug ");
6. Add
The specific usage is as follows:
1. Download
Download the http://code.google.com/p/microlog4android/downloads/list and microlog. properties files to the microlog4android-1.0.0.jar
2. Create a logger object
Private Static final logger = loggerfactory. getlogger (main. Class );
3.ProgramThe initialization method in the oncreate method of the first activity
Propertyconfigurator. getconfigurator (this). Configure ();
4. Put the microlog. properties file in the assets folder.
Note: Th
Memory (RAM)The total memory size information of Android is stored in the system's/proc/meminfo file, which can be obtained by reading this file: Public voidgettotalmemory () {String str1= "/proc/meminfo"; String str2=""; Try{FileReader fr=NewFileReader (STR1); BufferedReader Localbufferedreader=NewBufferedReader (FR, 8192); while((str2 = Localbufferedreader.readline ())! =NULL) {log.i (TAG,"---" +str2); } } Catch(IOException e) {}}The opera
Step 1. Open the Application Menu
1. Under the Standby page, click on the lower left corner menu key, select "Set".
2. Slide up the screen and select "Application".
Step 2. Select a program and click "Move to USB storage"
Select the application you want to move to the installed applications on the storage card and click "
One bad effect of gallery menu sliding is that each menu that goes through the middle is selected by default, and the data is loaded so that the switching is not smooth. There is a feeling of kakaka !! In fact, the thread is used to solve this problem. If the selected index value remains unchanged after a certain period of time, it indicates that it has remained stable. The last part.Code!// ---------------------- Used constant -----------------------
Here are some of the ways to make fat.img:mkdir Fat_diskmkfs.vfat-n [Mount name]-v-c fat.img [FAT partition size]Mount-o Loop,iocharset=utf8 fat.img fat_disk/CP-RFV Resource Path//* fat_disk/Umount fat_disk/mount point name can be from the settings-about the phone inside the phone model, is optional, can also not addFAT partition size with adb shell cat proc/emmc find FAT or intsd re adb shell cat proc/partitions Find the size of the corresponding valueAfter the production to mediatak/buid/tools
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.