Re: [android-developers] Re: how to get the total size of sdcard?

2010-03-22 Thread murali raju
thanks MrChaz.. its working On Fri, Mar 19, 2010 at 3:34 PM, MrChaz mrchazmob...@googlemail.com wrote: Something like this should work: StatFs stat = new StatFs(Environment.getExternalStorageDirectory().getPath()); long bytesAvailable =

Re: [android-developers] Re: how to get the total size of sdcard?

2010-03-22 Thread nayana urs
when i link sdcrad to emulator am getting error has no DNS server found am using windows os can anyone please help me with regards Nayana On Fri, Mar 19, 2010 at 3:04 AM, MrChaz mrchazmob...@googlemail.com wrote: Something like this should work: StatFs stat = new

[android-developers] Re: how to get the total size of sdcard?

2010-03-19 Thread MrChaz
Something like this should work: StatFs stat = new StatFs(Environment.getExternalStorageDirectory().getPath()); long bytesAvailable = (long)stat.getBlockSize() * (long)stat.getBlockCount(); long megAvailable = bytesAvailable / 1048576; the cast to