Voting: 
Vote up!
0 Votes
0 Replies
New

How to return byte[] from FFI?

Question asked by Ganesh kelam on Feb 22, 2017 07:31 EST

I am developing a camera FFI plugin for Kony on Android environment. In this FFI, I have a method to return captured image as byte[] i.e rawBytes. Here is my FFI method code   public JSONObject getImageRawBytes(String imageID) { byte[] result = null; JSONObject jObject = null;   // ImageHelper will return byte[] here. result = ImageHelper.getRawBytes(imageID); jObject = new JSONObject().put("RAWBYTES", result); return jObject; } But in JS, I am getting "RAWBYTES" value as [B@1ba4059f. I would like to get this as ArrayBuffer in JS.  Thanks In Advance.