Loading...
Logo
Processing Forum
olivvein's Profile
1 Posts
2 Responses
0 Followers

Activity Trend

Last 30 days
Show:
Private Message
    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.