image and xml in processing for android
in
Android Processing
•
1 year ago
Hi,
I'm new on android, but i've already done some programs for it.
I'd like to port some code from processing to android and the programs doesn't work.
I can't load data from internet. Of course, i've check the internet permissions.
I want to load an image from internet and display it.
PImage a;
a = loadImage("http://myserver.com/myimage.jpg");
image(a, 0, 0);
I want to import xml data :
XML xml;
String sites[] = loadStrings("http://myserver.com/mydata.xml");
String sitesOneLine = join(sites, "").replace("> <", "><");
xml = XML.parse(sitesOneLine);
int numSites = xml.getChildCount();
XML kid = xml.getChild("valeur");
String site = kid.getContent();
valeur = Integer.parseInt(site);
Is there an other way to do it?
Am i mistaking?
I really need to make it work, processing for android is easier for me than using eclipse and the sdk.
Thanks a lot.
I'm new on android, but i've already done some programs for it.
I'd like to port some code from processing to android and the programs doesn't work.
I can't load data from internet. Of course, i've check the internet permissions.
I want to load an image from internet and display it.
PImage a;
a = loadImage("http://myserver.com/myimage.jpg");
image(a, 0, 0);
I want to import xml data :
XML xml;
String sites[] = loadStrings("http://myserver.com/mydata.xml");
String sitesOneLine = join(sites, "").replace("> <", "><");
xml = XML.parse(sitesOneLine);
int numSites = xml.getChildCount();
XML kid = xml.getChild("valeur");
String site = kid.getContent();
valeur = Integer.parseInt(site);
Is there an other way to do it?
Am i mistaking?
I really need to make it work, processing for android is easier for me than using eclipse and the sdk.
Thanks a lot.
1