Important! A new Community experience launched on September 26, 2017. Read more about it here or continue to Base Camp.
Vote up!
0 Votes
1 Replies

How to return byte[] from FFI?

Ganesh kelam on Feb 22, 2017 07:31 EST

Posted In
Vote up!
0 votes
Vote down!

Hi Ganesh,

You cannot pass rawbytes as input to a service (as defined in Kony Middleware Server). You should convert the bytes to base64 string and send it as string input to the service.

Open Media Callback on android provides rawbytes which is the uri of the image when you print it it gives you the path. Convert that uri to actual file path of the image and resize,compress it and return the required base64 data back to JS layer.

Please find the sample app that we made where the pdf is converted to byte array and is converted to Object and the same we can get in kony through FFI callback. The datatype which we get from FFI is an Javascript Object type.

Thank You

Replied by: Apr 06, 2017 13:52 EDT