Pdf transfer in chat

Hello,
I was wondering if there is a specific method made for sending files like pdf in chat?

Thanks for your support.

Hello @vavci
You can use the sendMediaMessage() method provided by the SDK and set the message type to file for sending pdf files. Please refer to the below link for more information

https://prodocs.cometchat.com/docs/android-messaging-send-message#media-message

Hope this helps
Thanks

I’ve implemented the same code but it shows this error when choosing the pdf file:-

Failure delivering result ResultInfo{who=null, request=1, result=-1, data=null} to activity

Hi @vavci,

The above error occurs when the file is not selected properly. We will suggest you refer our sample app. It includes feature to send pdf file in chat.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.