AIMCC Technote 6
Typing Indicator
Q: What is typing (or input) state (or status)?
A: It's an indication sent to a specific remote user or chat room that informs that remote user or chat room whether the local user is preparing an IM (or sound) to send.
Q: What if a user doesn't want to disclose typing state?
A: Users specify whether to disclose their typing state by toggling preference "aimcc.privacy.discloseTypingStatus." AIMCC enforces the preference automatically.
Q: What is a proper way to set typing state?
A: Follow these steps...
- 1. When the local user presses a key and the text field is not empty, call put_InputState(AccImInputState_Typing) and set (or reset) a timer to fire in 2 seconds
- 2. When the timer fires because there has been no key press for 2 seconds:
- if the text field is empty, call put_InputState(AccImInputState_None)
- otherwise, call put_InputState(AccImInputState_NotEmpty)
- 3. When an IM is sent, stop the timer if it's running. AIMCC automatically sets the typing state of a remote user to AccImInputState_None when an IM is received.
Q: put_InputState() fails. What am I doing wrong?
A: If no IMs have been sent/received the call fails, but errors from put_InputState() are non-fatal and can safely be ignored.
Q: How is a local user notified of a remote user's typing state?
A: OnInputStateChange fires.
rev. 2008/06/30