Recent searches


No recent searches

Zendesk Chat - Android attach file issue

Answered


To attach file to chat we have method - chatProvider().sendFile(File file, FileUploadListener fileUploadListener); The problem is that starting from android 11 we cannot get real file path and create a File class instance. We have an Uri for the file and can open InputStream to get data, but cannot get a File for it. We can create a new file in app specific folder and copy data into it, but it's a bit silly. Is there any workaround or working approach for it? How can I attach file from non app-specific folder to chat(i.e. download folder). Maybe it's worth to consider adding chatProvider().sendFile(fileName:String, fileData:byte[], FileUploadListener fileUploadListener);

1

1

1 comment

image avatar

James G

Zendesk Customer Care

Hi Станислав,

"We can create a new file in app-specific folder and copy data into it"

Currently, this is the only way to send a file, our Chat Provider API requires a File object to be provided and the file to be located in the app-specific folder. This is something that we can address in the future under the new Zendesk SDK for messaging. However, we’re unlikely to change the Chat SDK v2 at this point.

You can find information on the Zendesk SDK for messaging in this article from our knowledge base: Working with messaging in the Web SDK. 

I hope this helped. Thank you!


0


Post is closed for comments.

Didn't find what you're looking for?

New post