public final class ChatTyping extends com.bbm.sdk.bbmds.BbmdsProtocol.OutboundMessage
Your application sends this to bbmcore when it considers the user to have started typing in a chat. This event will be relayed in real-time to other participants of the chat.
Received typing events are reported to receivers via the 'typing' list. On the receiving endpoints, the typing state of a user automatically decays back to "not typing" after a short delay or when a message from them is added to the chat's history. There is no need for your application to inform bbmcore when a user stops typing.
In certain conditions, bbmcore may not actually transmit the typing notification to the other participants of the chat. These conditions include when there are no previous messages in the chat (on the local endpoint) or when the previous messages in the chat are older than five minutes. Filtering the events in this way helps optimize message transmission for cases where it is very unlikely that the other participants are expected to read a typing indicator on their endpoints.
It is recommended that your application wait a short delay after the commencement of typing before issuing this request. Short messages can often be typed in a few seconds, and it is often better to simply send the message itself instead of a typing notification followed by the message in very short succession.
|Constructor and Description|
Creates a new outbound 'chatTyping' message.
|Modifier and Type||Method and Description|
Sets the optional 'messageId' attribute on the message
Sets the optional 'tag' attribute on the message
public ChatTyping(java.lang.String chatId)
chatId- The id of the chat in which the local user is typing.
public ChatTyping messageId(long value)
value- If supplied, this is the id of the 'chatMessage' the local user is taking the action against as indicated by the 'tag' field. This field is ignored when the 'tag' isn't present or when the messageId isn't known to bbmcore.
public ChatTyping tag(java.lang.String value)
value- Your application-specified tag that indicates what kind of typing action the local user is performing. For example, this may be used to indicate that the local user is taking a picture to send, recording a voice note, or editing an existing message. When omitted, receivers will assume the local user is typing a message.