Pass array from Titanium to android java
Can anyone show me how to pass array from titanium (javascript) to android (java)?
###Example:
var myArray = new Array();
myArray[0]="example1";
myArray[1]="example2";
myArray[2]="example3";
2 Answers
-
An array of what? if is is data that can be converted to a string of some sort, I would suggest using JSON to pass the data between the two
-
var myArray = new Array();
myArray={'data1','data2','data3'};this way to write in your coding, i think this is write way to declaration