Ahmed Salem
Ahmed Salem

Reputation: 1757

Writing to SDCARD problem in Android?

When implementing download function it work but during file saving to sdcard i get the following

Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required.

Also IO Exception occure

W(14495:0x389f) java.io.FileNotFoundException: /sdcard W(14495:0x389f) at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:244) W(14495:0x389f) at java.io.FileOutputStream.(FileOutputStream.java:97) W(14495:0x389f) at java.io.FileOutputStream.(FileOutputStream.java:168) W(14495:0x389f) at java.io.FileOutputStream.(FileOutputStream.java:147)

Upvotes: 0

Views: 488

Answers (1)

Robby Pond
Robby Pond

Reputation: 73494

First make sure you get the File object by calling

File dir = Environment.getExternalStorageDirectory();

Also if you app is using 1.6+ you will need the WRITE_EXTERNAL_STORAGE permission. If that doesn't help, post the code.

Upvotes: 2

Related Questions