Ask Your Question

chriskrk's profile - activity

2014-09-05 09:39:48 -0600 received badge  Editor (source)
2014-09-05 09:37:07 -0600 asked a question Image save filure
  • List item

Hi, I've got vety tricky problem. My app fails to write image. Problem is not usual because on a different phone it worked perfectly.

Image saving fails on SE wt19i. SdCard works ok - phone can save photos with no problem. Moreover I file.mkdirs() also work as it should.

Of course I have correct manifest file: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

What could possibly cause failure ?

Here is my code:

private boolean saveImage (Mat mat) {
       File path = new File(Environment.getExternalStorageDirectory() + "/Images/");
       path.mkdirs();
       File file = new File(path, "SeCam " + new Date() + ".jpeg");

       String filename = file.toString();
       return Highgui.imwrite(filename, mat);
}