JavascriptInterface Android passing arguments

Viewed 312

I have a question if i call android function from javascript file and pass arguments to it, all arguments will be passed as Strings?

for example

Javascript

var cars = ["Saab", "Volvo", "BMW"];
API.CreateCars(cars);

Android site

CreateCars(String[] cars){...}

It will be working? Or i should pass cars array as one string and next parse it on android site to array?

1 Answers
Related