Hi:
   I have the following code in my application. When loaded into the
phone, I get "File Open Exception". Any idea what I may be doing
wrong? I suspect some issue with permissions or something but I'm not
sure.

========================= code snippet ====================
        FileOutputStream fos;
                try {
                        fos = this.openFileOutput("/sdcard/demo.txt",
MODE_WORLD_WRITEABLE);
                        try {
                                fos.write("Appended".getBytes());
                                fos.close();
                        } catch (IOException e) {
                                // TODO Auto-generated catch block
                        Toast.makeText(getBaseContext(),
                                "File Write or Close Exception!!",
                                Toast.LENGTH_SHORT).show();
                                e.printStackTrace();
                        }
                } catch (FileNotFoundException e) {
                        // TODO Auto-generated catch block
                Toast.makeText(getBaseContext(),
                        "File Open Exception!!",
                        Toast.LENGTH_SHORT).show();
                        e.printStackTrace();
                }
===================================


Regards...Pradeep.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to