processing-android icon indicating copy to clipboard operation
processing-android copied to clipboard

failed to access a file in processing Android Mode

Open atyclb opened this issue 5 years ago • 0 comments

I am trying to access a file in Processing Android Mode using the following:

File file = new File(filePath);

And I tried the following options for setting filePath for the file “1.sf2” in the “data” folder that I created in the current sketch directory. However, none of them worked.

filePath = dataPath(“1.sf2”); filePath = sketchPath(“data/1.sf2”); filePath = sketchPath(“assets/1.sf2”); filePath = “data/1.sf2”; filePath = “assets/1.sf2”;

According to the issues page, everying file in the “data” folder of the current sketch directory is automatically copied to the “assets” folder of the generated apk file. However, I keep getting “java.io.FileNotFoundException: /null/restore_pixels: open failed: ENOENT (No such file or directory)” exception every time I run the application on my Android device.

Is there a way to correctly access a file in Processing Android Mode? Thanks a lot!

atyclb avatar Jan 28 '20 10:01 atyclb