Converted the java int array into javascript array before calling vibrate with pattern.