formatting SD CARD in Android
<p>I want to format SD card, I am using the follow code. But the SD card can not mount. </p>

<pre><code>public boolean formatSD() {
        boolean bool = false;
        IMountService mountService = null;
        try{
            IBinder ibi = ServiceManager.getService("mount");
            if(ibi!=null) {
                mountService = IMountService.Stub.asInterface(ibi);
                String extern_sd = Environment.getFlashStroageDirectory().getAbsolutePath();
                mountService.unmountVolume(extern_sd, true);

                Thread.sleep(4000);
                int result_format = mountService.formatVolume(extern_sd);       
                System.out.println("result_format: "+result_format);          
                if(result_format==0){
                    Thread.sleep(4000);

                    int result_mount = mountService.mountVolume(extern_sd);
                    System.out.println("result_mount:  "+ result_mount);
                }
                bool = true;
            }
        }catch(Exception e){
            System.out.println("Exception format: "+e.getMessage());
        }
        return bool;
    }
</code></pre>

<p>Can somebody please tell me what i did wrong? Thanks </p>
