Closed
Description
Did you verify this is a real problem by searching [Stack Overflow]
Yes
Tell us about the problem
When calling Java method that takes long[] as a parameter with javascript array, it is marshalled to Java array but large values are truncated to int.
Workaround for the problem; explicty create array with Array.create("long", arr.length) and use that array to call java method.
Please provide the following version numbers that your issue occurs with:
tns-android 2.4.1
Did the error happen while the app was being constructed? (buildtime error)
No
Did the error happen while the app was executing? (runtime error)
Yes
Please tell us how to recreate the issue in as much detail as possible.
Sample java method:
public String test(long[] arr)
{
return Arrays.toString(arr);
}
Javascript call:
console.log(className.test([ 1485609581321, 1485609581321 ]))