2012-06-12 34 views

回答

0
File sdCardDirectory = Environment.getExternalStorageDirectory(); 

This is to find sdcard path 

File path = Environment.getDataDirectory(); 
StatFs stat = new StatFs(path.getPath()); 
long blockSize = stat.getBlockSize(); 
long availableBlocks = stat.getAvailableBlocks(); 
return Formatter.formatFileSize(this, availableBlocks * blockSize); 

This is to find Internal Phone Storage 
+0

謝謝。但是如何找到其他路徑和內存大小。 – Bala

+0

將其標記爲答案一旦你接受它請等待我將更新你 –

+0

Selvan ..感謝它的工作正常。例如我的手機用於內部SD卡和外部SD卡。如何找到內部SD卡的路徑。 – Bala

相關問題