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?
Correct. You do not need to have a
mediaSession
in order to send an IM. Thevline.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 callpostMessage
orpublishMessage
to send the IM, with the difference between the two being thatpostMessage
saves the IM history, whilepublishMessage
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 specificPerson
.