0

I'm building an app similar to What's App.
I have to understand, before continuing, how to make it more 'Real Time'.

When you chat and somebody is answering you, you will see in real time if he is typing.

How can they do that so fast?
Is it a peer to peer push?

What's App for Android

Kara
  • 6,115
  • 16
  • 50
  • 57
Olsi
  • 929
  • 2
  • 12
  • 26

2 Answers2

1

Most chat programs just send an event when you are beginning to enter something in the EditText and clear it with sending the message.

You could start an event when beginning to type and check on the device every few seconds if when the last input has happened. Use some offset and decide that the user is not typing anymore - done ;)

Tim
  • 6,692
  • 2
  • 25
  • 30
0

The client can constantly send a message to server if user is typing or not. Another client (rece will read this message. Does not metter if it is Client-server or P2P.

You can send only 1 bit each second. Todays networks allow you to send tens of millions of bits per second, and also latency is also very low.

Ivan Kuckir
  • 2,327
  • 3
  • 27
  • 46