Writing to a file on Android issue
<p>I am currently trying to paste current time into a file for an Android application. The code looks like this but the file is not created. I have enabled the permission of my application to write on the SD card through the manifest. Any ideas?</p>

<pre><code>    Time today = new Time(Time.getCurrentTimezone());
    today.setToNow();
    try {
        File myFile = new File("/sdcard/mysdfile.txt");
        myFile.createNewFile();
        FileOutputStream fOut = new FileOutputStream(myFile);
        OutputStreamWriter myOutWriter = 
                                new OutputStreamWriter(fOut);
        SimpleDateFormat dF = new SimpleDateFormat("HHMMSS");
        StringBuilder current = new StringBuilder(dF.format(today));
        myOutWriter.append(current);
        myOutWriter.close();
        fOut.close();

    }
</code></pre>
