Not sure if you can help me, but I am stuck on some code this semester; I'm using PhoneGap for Android..
I am using a class within DroidGap that has some variables I want to read and manipulate within JQuery mobile pages; the code starts at this (focus is on buttons array) public class MainActivity extends DroidGap { //create instance of DonsIOIO_BigUgly public class DonsIOIO_BigUgly extends PApplet { //getter inside here to get value /* Don's IOIO Big Ugly * Reading wireless key fob switches * Reading otoscope present/not present switch */ // import the IOIO and android libraries - apparently Eclipse moves these lines somewhere else... // declare variables public int testInt = 8; public boolean[] buttons = {false, false, false, false, false}; //later buttons is set to true buttons[4] = buttonOto.read(); // last read statement buttons[4] = true; In the onCreate function, I found I can use a javascript call to get the variable buttons into the jQuery mobile page: public void onCreate(Bundle savedInstanceState) { DonsIOIO_BigUgly myDonsIOIO_BigUgly = new DonsIOIO_BigUgly(); boolean testInfo = myDonsIOIO_BigUgly.buttons[4]; super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/patient.html"); super.loadUrl("javascript:alert('" + testInfo + "');"); When this runs, I get an alert window that reads "false"...what it seems is that the initial value is read, but there is nothing that is requesting the value be read in a loop..is there some construct I can use to have the variable be read when it turns to true later in the code? Thanks so much for your help, Micael -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.