SD card If there is no problem, in general format can solve the problem. But make a good backup of your data. If the card itself has problems, it is not read out card. This is a good job, you can add other people's cards to try. If the identification, the phone is no problem, the problem is the
This article mainly describes how to write data to the SD card, where the main technology is environment in the method.1.2. Implementation code:/datasave/src/com/amos/datasave/savepasswordservice.java //Write data to SDcard Public voidSavepasswordtosdcard (string name, string password) {//Android 2.1/sdcard/xx.txt//Android 2.2/mnt/sdcard/xx.txt//Self_define/excard/xx.txt//File externalstoragedirector
When you need to format SD card, the contents of the cell phone SD card are all cleared away, so do the data backup in advance
1. In Samsung mobile phone Galaxy sm-c5000 (6.0.1) "Set".2. Locate "Battery and storage" in the Settings list.3. Then click "Store" in the stor
Android obtains the total capacity of the SD card, available size, total body memory capacity and available size, and androidsd
Public long getSDTotalSize () {/* get the memory card path */File sdcardDir = Environment. getExternalStorageDirectory ();/* StatFs View File Syste
This article describes the Android implementation to obtain the total capacity of SD card, available size, total memory capacity of the fuselage and the available size of the method. Share to everyone for your reference, specific as follows:
Maybe some students do not know that the system has been provided to obtain t
Android newest mobile phone internal storage size, SD card storage size Method
We used to obtain this information in the past.
// Before Android API18: fs. getAvailableBlocks () * fs. getBlockSize ()
Currently:
/** Obtain available system memory **/@ SuppressLint ("NewApi") private String getMemFree () {S
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
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.