How to send files with Sinch Instant Message? - sinch

I am developing a chat app and I am using Sinch SDK for JavaScript. My question is simple.
How can I send files through the Instant Message, to another user that I am chatting with?

It's only text messages, no attachments.

Sinch until now supported text only , therefore you can benefit from texting attachments between two devices.
Make your own API to upload files to your server when uploading is successfully done you can send json object to sinch client to tell him an file send successfully like this
{ "type":"image" , "value":"<your-url-image-in-your-server>"}
The receiver device can fetch this message and convert it from text to json object and receive the file from value attribute.
And you can do same for any type of files (Images - Sound - PDF ...etc).
I hope to help any one to use Sinch for sending attachments.

Related

Can we send file as an attachment along with message in teams programmatically?

Can we send file as an attachment along with message in teams using webhooks or api?
Currently we can send only text message using webhooks and not attach files.
I want to mimic the action in the screenshot below:-
Attach file present in the system
There are ways to first upload file to one drive and then send its link in the teams message but I do not want to use that solution.
Is there a way to directly upload file from your system as an attachment to the microsoft teams using webhook or any alternative way.
Thanks!!
Currently it is not supported to send attachments using webhook. You will need to use bot to send and receive attachments. You can refer this link.
https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bots-filesv4

Need help for sending email with attachment for windows platform(UWP react-native-windows)

I am using react-native for developing my UWP windows application(windows-10), and get stuck with opening email application with attachment.
React-native’s Linking is send mail with text body and without any attachment.
So, is there any functionality or any library which supports sending email with attachment for windows platform?

Can you send rich text messages via Twilio?

I am trying to send a rich text message via Twilio. I am able to send regular SMS messages, but I want to include a hyperlink in the body of the text.
I tried the twilio mediaUrl to include an rtf file, but that didn't work. Including html in the body of a message doesn't work as it just sends in plain text.
I'm posting via curl to the twilio endpoints, so i'd prefer not to have to get into PHP or some other language to achieve this. I just want to send raw data to twilio and receive a rich text message back, if it's possible.
Twilio developer evangelist here.
Using Twilio you can send MMS messages to numbers in the US and Canada. When you pass a mediaUrl the file needs to be hosted somewhere publicly on the web and it will then be included within the message.
You can pass files of any of the mime types listed here, though when sending RTF the result will depend on how well the receiving device supports RTF files.
If you want to include a link, I'd recommend shortening the URL (using bit.ly or similar) and just sending it as part of the text. Most smart phones will auto link the URL. Built in SMS apps on phones don't support markup of any sort, which is why your attempt with HTML just showed the raw markup.
Let me know if this helps at all.

Simulating an attachment in the emailtask

In phone7 development, being able to send an email requires the use of the email task. This object doesn't not have an attachments property, and many ppl on various forums have complained about this particular lack of functionality. The problem is that Microsoft applications such as the picture gallery and OneNote have the ability to attach images and sound recordings to emails. This implies that there is a way to attach them.
Question: Is there a "hack" or other method that can be used to send emails with attachments in phone7?
No, there is no way to send attachments via the EmailComposeTask in a third party app. If you don't want to use an EmailComposeTask, you could create a server that runs a webservice which performs the sending of the email. Your app could then upload the attachment to that webservice.

How to send email with an attachment using Windows Phone 7 API?

My WP7 application requirement is to send the email with an attachment and use device default SMTP settings.
I have tried EmailComposeTask class but it doesn't have any member for attachment.
The other idea, i am thinking is to upload the file on server and then send the email from that server.
What you think if there is no way to send the email with an attachment using WP7 API?
Your observation is correct, at this point in time EmailComposeTask doesn't support attachments and this is the only facility to send email programatically from the device at the moment.
As you note, you can communicate with a server which can perform this task on behalf of your app.
I found a wp7 and wp8 library that does it: http://www.windowsphonegeek.com/marketplace/components/livemailmessage
Try to create web service to send mail in your webserver. so, we can call the from your app to send mail.
I hope upcoming version it will be possible!
Please check this URL for more details http://forums.silverlight.net/forums/p/209808/493532.aspx
I've found this article, but I did not make any test yet.
From the author:
EmailComposeTask won’t allow you to send attachments, but this doesn’t mean that you cannot send files through it. .NET Framework has these two amazing methods: Convert.ToBase64String and Convert.FromBase64String. The first will allow the developer to convert a byte array (byte[]) to a Base64-encoded string, the other one will do the same operation in reverse.
Reference:
Pushing the Limits of the Windows Phone SDK and Sending Files via EmailComposeTask

Resources