i am sending an int array from my android application and it's recieved very well in the JS but the thing is i'm assigning the array to a global variable but the variable is always undefined.
var values;
function getFromAndroid() {
alert(Android.getFromAndroid());
this.values = Android.getFromAndroid();
this.values = JSON.parse(this.values);
alert("Hello! Data are: " + this.values + "; first = " + this.values[0]); //not null
}
var chart;
alert("Hello!: " +this.values[0]); //undefined