Good afternoom,
I want read a image salved in a public directory of my pc, from android app.
I'm trying this code:
String ERROR = "";
PImage requestIMG = null;
boolean loadIMG = true;
void setup()
{
try{
size(1000,1000);requestImageN();
}catch(Exception e){ERROR = ERROR + "ERROR C";}
}
void draw()
{
delay(1000);text(ERROR,50,50);
try{
if(loadIMG == true && requestIMG != null && requestIMG.width > 0)
{
loadIMG = false; requestIMG.loadPixels();image(requestIMG, 0,50);
}
}catch(Exception e){ERROR = ERROR + "ERROR B ";}
}
void requestImageN()
{
if(loadIMG == true){
try{ requestIMG = requestImage("//NAME-PC/NEWS/image/1.png");}catch(Exception e){ERROR = ERROR + "ERROR A ";}
}
}
It works with processing from W7, but fails in Android.
I think the problem may be how to point to the directory, but I tried various changes and can not solved it.
Regards and thanks in advance,
Anthony20