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
Unanswered fails to attach file on Android devices

Question asked by Ganesh kelam on Mar 21, 2017 10:18 EDT

I have developed a Kony Android custom camera FFI - which sends captured image as base64 string to js layer. I am succesfully converting that base64 to rawBytes using kony.convertToRawBytes API. But when I try to share rawBytes image as attachment to email, it is throwing " Couldn't attach file." error toast.  My Code var rawBytes = kony.convertToRawBytes(imageBase64); // "imageBase64" is valid base64 image returned from my FFI.[], [], [], "Kony email subjet"," ", false, [ { mimetype : "image/*",  attachment : rawBytes }]); From below link, it should work. Same API call is working fine in iOS. is this a bug in Android? Am I refering to wrong documentation? is there anyway to achieve this? Note: base64 image and converted rawBytes are valid, I check by writing to external SD card.    

Kony Answered Certificate
Vote up!
0 votes
Vote down!

Hi Ganesh,

If you check our document link,

Raw bytes received only from the (only public access mode) or APIs. To attach raw bytes received from other sources, you need to follow the  Sharing a File in Android with other Apps procedure. Please check the below link for more details.



Answered by: Mar 22, 2017 06:46 EDT