Question

To be able to chat with someone by sending the vLine im-type messages, you don’t need to have a mediaSession established with the remote user first, correct? All you need is the remote person’s ID and you can send them message, correct?

Or not? And if not, how do you do send an IM with vLine?

Was it helpful?

Solution

Correct. You do not need to have a mediaSession in order to send an IM. The vline.MediaSession is only used for audio and/or video sessions.

To send an IM, you just need to have the vline.Person object representing the person that you want to send the message to. You can then call postMessage or publishMessage to send the IM, with the difference between the two being that postMessage saves the IM history, while publishMessage does not.

Also, you can send IMs to a user even if that user is not online and use the Person.getUnreadCount API to keep track of the number of unread messages from a specific Person.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top