Get Info when the User is typing

968 views
Skip to first unread message

Evans Attafuah

unread,
May 11, 2015, 12:26:44 PM5/11/15
to fireba...@googlegroups.com
Hello,

I wanted to know when a user is typing in my android app. Can anyone help me.

Best Regards,

Evans.

Jacob Wenger

unread,
May 14, 2015, 2:42:36 AM5/14/15
to fireba...@googlegroups.com
Hi there,

I don't think this question is really related to Firebase. You will probably be better off asking this question on Stack Overflow. Maybe this Stack Overflow post will give you some ideas.

Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/5aec7c75-ef5d-440b-ae28-3fb8b69f6c04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

GmailMe

unread,
May 14, 2015, 3:07:33 AM5/14/15
to fireba...@googlegroups.com
Thanks. Since firebase gives me a presence API, I thought that feature can be worked out using that. But thanks. 

Sent from my iPhone 6
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/88LRdZBJHgA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Evans Attafuah

unread,
May 15, 2015, 7:26:27 AM5/15/15
to fireba...@googlegroups.com
Hello Jacob,

It seems you didn't understand my question. What I meant was if am chatting with a user on the same channel (firebase reference) how do I detect if the user is typing. Are there any API's I can use for this type of functionality. 

visdyn

unread,
May 15, 2015, 8:23:12 AM5/15/15
to fireba...@googlegroups.com
I believe what you are asking is; if user A is typing a message to User B, you want User B to see a message 'User A is Typing' or something along those lines.

You can leverage Firebase to handle this yes - we do Mac development but I would think it would be a similar concept across platforms. The bulk of the logic is implemented on the device, not in Firebase however.

Firebase would be used as the notification mechanism to notify the user that something being typed into a text field or a user is no longer typing.

On OSX, we have textfield's (NSTextField) that can detect when the field has begun or ended editing, a delegate method is called  'controlTextDidBeginEditing' when User A begins typing.

In that method, a flag or other info could be written to a Firebase node indicating say, the user id ( uid ) or name of the user that's typing, time, date, phase of the moon or whatever.

User B is observing that Firebase Node so when a child is added, edited or changed they are notified and can display the appropriate message.

Likewise, User A is also observing a Firebase node so it will know when User B is typing.

When the user is done typing (editing the field) (OS X controlTextDidEndEditing) data could be written to Firebase to indicate the user is done typing. Again, the other user is observing changes, additions or edits to that node so it will always be apprised of what's going on.

You could keep all of the chatting data in firebase if you need traceability in the future, or you could have the nodes delete themselves when the user logs off or terminates the conversation.

Evans Attafuah

unread,
May 15, 2015, 9:29:44 AM5/15/15
to fireba...@googlegroups.com
Thanks visdyn,

this helps a lot. 

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/88LRdZBJHgA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages