SlideShare a Scribd company logo
1 of 7
How to implement typing indicator in android?
“Clement is typing…”
- Have you ever kept staring at your mobile screen waiting for the other
person’s reply while she is typing...
With the rise of instant chat, we see this daily in one platform or the other. Typing indicator
makes you aware that the other person is responding to your message.
You are 3 steps away to implement typing indicator in your chat app and they are below:
1. Attach a text change listener to the text view.
2. Publish and subscribe typing status of the user
3. Update typing status real time on UI
Step 1: Attach a text change listener
TextWatcher’s afterTextChanged method is called to notify you that, somewhere within EditText,
the text has been changed.
If text is changed and
length is 1 that means typing is started,
length is 0 means typing is stopped.
Sample android code:
messageEditText.addTextChangedListener(new TextWatcher() {
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
public void afterTextChanged(Editable s) {
if (!TextUtils.isEmpty(s.toString()) && s.toString().trim().length() == 1) {
//Log.i(TAG, "typing startedevent...");
typingStarted = true;
//send typing started status
} else if (s.toString().trim().length() == 0 && typingStarted) {
//Log.i(TAG, "typing stopped event...");
typingStarted = false;
//send typing stopped status
}
}
});
Source: https://github.com/AppLozic/Applozic-Android-
SDK/blob/09334e9e891b80d143886cb0047c679f00e07a6c/mobicomkitui/src/main/java/co
m/applozic/mobicomkit/uiwidgets/conversation/fragment/MobiComConversationFragment.ja
va
Step 2: Publish and subscribe typing status of the user
It is time to send and receive typing status to the other device. This can be implemented
using publish-subscribe pattern. Let’s understand what is publish-subscribe pattern.
publish–subscribe is a messaging pattern where senders of messages, called publishers, do not
program the messages to be sent directly to specific receivers, called subscribers, but instead
characterize published messages into classes without knowledge of which subscribers, if any, there
may be. Similarly, subscribers express interest in one or more classes and only receive messages
that are of interest, without knowledge of which publishers, if any, there are.
Now, all we have to do is:
Subscribe user A’s app to a topic “/topic/user-a”, user B’s app to a topic “/topic/user-b” and
publish the typing status to receiver’s topic.
User A User B
Subscribe /topic/user-a /topic/user-b
Publish /topic/user-b /topic/user-a
Typing started 1 1
Typing stopped 0 0
In order to send data from one device to another device in real time, we will require a socket
based connection. There are many options available like Socket.io, Mosquitto.org,
RabbitMQ.
For this tutorial, we will use RabbitMQ.
Run RabbitMQ MQTT Adapter on your server.
On android, use the eclipse paho library to create mqtt client.
org.eclipse.paho.android.service-1.0.2.jar
org.eclipse.paho.client.mqttv3-1.0.2.jar
Above 2 versions can be found here: https://github.com/AppLozic/Applozic-Android-
SDK/tree/master/mobicomkit/libs
Android code to publish data:
MqttClient client = new MqttClient(MQTT_URL, userId + "-" + new Date().getTime(),
new MemoryPersistence()
);
MqttMessage message = new MqttMessage();
message.setRetained(false);
message.setPayload(typingStatus).getBytes());
message.setQos(0);
client.publish("topic/" + userId, message);
client.subscribe("topic/" + userB, 0);
Source: https://github.com/AppLozic/Applozic-Android-
SDK/blob/09334e9e891b80d143886cb0047c679f00e07a6c/mobicomkit/src/main/java/com/
applozic/mobicomkit/api/ApplozicMqttService.java
Step 3: Update typing status real time on UI
At the receiver’s end, upon receiving typing status, show and hide the typing indicator
accordingly.
Below is the android code to receive the typing status
@Override
public void messageArrived(String s,final MqttMessage mqttMessage) throws
Exception {
Log.i(TAG, "Received MQTT message: " + new String(mqttMessage.getPayload()));
try {
if (!TextUtils.isEmpty(s) && s.startsWith(TYPINGTOPIC)) {
String typingResponse = mqttMessage.toString();
// Broadcast typing status to the current activity/fragment and display the typing
label.
}
}
More resourceful links:
Find typing indicator code in Applozic open source chat sdk available in github.
https://github.com/AppLozic/Applozic-Android-SDK for light weight Android Chat SDK
https://github.com/AppLozic/Applozic-iOS-SDK for light weight iOS Chat SDK
On iOS, you can use MQTT Client Framework for sending and receiving data from devices.
Source: http://www.applozic.com/blog/how-to-implement-typing-indicator-in-android-chat-
app/
Reference:
http://www.slate.com/articles/technology/bitwise/2014/02/typing_indicator_in_chat_i_built_it
_and_i_m_not_sorry.html
https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern

More Related Content

Similar to Implement typing indicator in Android chat apps

Architecture your android_application
Architecture your android_applicationArchitecture your android_application
Architecture your android_applicationMark Brady
 
Iot hub agent
Iot hub agentIot hub agent
Iot hub agentrtfmpliz1
 
Android Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolAndroid Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolFatih Özlü
 
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2Shanmugapriya D
 
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialPowering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialBenjamin Cabé
 
4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message BrokersPROIDEA
 
Android development training programme , Day 3
Android development training programme , Day 3Android development training programme , Day 3
Android development training programme , Day 3DHIRAJ PRAVIN
 
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxxMAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx34ShreyaChauhan
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingPeter R. Egli
 
Android intents, notification and broadcast recievers
Android intents, notification and broadcast recieversAndroid intents, notification and broadcast recievers
Android intents, notification and broadcast recieversUtkarsh Mankad
 
Android Application Component: BroadcastReceiver Tutorial
Android Application Component: BroadcastReceiver TutorialAndroid Application Component: BroadcastReceiver Tutorial
Android Application Component: BroadcastReceiver TutorialAhsanul Karim
 
test validation
test validationtest validation
test validationtechweb08
 
Test DB user
Test DB userTest DB user
Test DB usertechweb08
 
PART-2 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-2 : Mastering RTOS FreeRTOS and STM32Fx with DebuggingPART-2 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-2 : Mastering RTOS FreeRTOS and STM32Fx with DebuggingFastBit Embedded Brain Academy
 

Similar to Implement typing indicator in Android chat apps (20)

Architecture your android_application
Architecture your android_applicationArchitecture your android_application
Architecture your android_application
 
Iot hub agent
Iot hub agentIot hub agent
Iot hub agent
 
Android Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolAndroid Implementation using MQTT Protocol
Android Implementation using MQTT Protocol
 
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2
 
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialPowering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
 
4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers
 
Android development training programme , Day 3
Android development training programme , Day 3Android development training programme , Day 3
Android development training programme , Day 3
 
An introduction to MQTT
An introduction to MQTTAn introduction to MQTT
An introduction to MQTT
 
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxxMAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
 
XSS
XSSXSS
XSS
 
XSS
XSSXSS
XSS
 
Android Toast.pdf
Android Toast.pdfAndroid Toast.pdf
Android Toast.pdf
 
Broadcast Receiver
Broadcast ReceiverBroadcast Receiver
Broadcast Receiver
 
mqttvsrest_v4.pdf
mqttvsrest_v4.pdfmqttvsrest_v4.pdf
mqttvsrest_v4.pdf
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message Queueing
 
Android intents, notification and broadcast recievers
Android intents, notification and broadcast recieversAndroid intents, notification and broadcast recievers
Android intents, notification and broadcast recievers
 
Android Application Component: BroadcastReceiver Tutorial
Android Application Component: BroadcastReceiver TutorialAndroid Application Component: BroadcastReceiver Tutorial
Android Application Component: BroadcastReceiver Tutorial
 
test validation
test validationtest validation
test validation
 
Test DB user
Test DB userTest DB user
Test DB user
 
PART-2 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-2 : Mastering RTOS FreeRTOS and STM32Fx with DebuggingPART-2 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-2 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Implement typing indicator in Android chat apps

  • 1. How to implement typing indicator in android? “Clement is typing…” - Have you ever kept staring at your mobile screen waiting for the other person’s reply while she is typing... With the rise of instant chat, we see this daily in one platform or the other. Typing indicator makes you aware that the other person is responding to your message. You are 3 steps away to implement typing indicator in your chat app and they are below: 1. Attach a text change listener to the text view. 2. Publish and subscribe typing status of the user 3. Update typing status real time on UI Step 1: Attach a text change listener
  • 2. TextWatcher’s afterTextChanged method is called to notify you that, somewhere within EditText, the text has been changed. If text is changed and length is 1 that means typing is started, length is 0 means typing is stopped. Sample android code: messageEditText.addTextChangedListener(new TextWatcher() { public void beforeTextChanged(CharSequence s, int start, int count, int after) { } public void onTextChanged(CharSequence s, int start, int before, int count) { } public void afterTextChanged(Editable s) { if (!TextUtils.isEmpty(s.toString()) && s.toString().trim().length() == 1) { //Log.i(TAG, "typing startedevent..."); typingStarted = true; //send typing started status } else if (s.toString().trim().length() == 0 && typingStarted) { //Log.i(TAG, "typing stopped event..."); typingStarted = false; //send typing stopped status } }
  • 3. }); Source: https://github.com/AppLozic/Applozic-Android- SDK/blob/09334e9e891b80d143886cb0047c679f00e07a6c/mobicomkitui/src/main/java/co m/applozic/mobicomkit/uiwidgets/conversation/fragment/MobiComConversationFragment.ja va Step 2: Publish and subscribe typing status of the user It is time to send and receive typing status to the other device. This can be implemented using publish-subscribe pattern. Let’s understand what is publish-subscribe pattern. publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers, but instead characterize published messages into classes without knowledge of which subscribers, if any, there may be. Similarly, subscribers express interest in one or more classes and only receive messages that are of interest, without knowledge of which publishers, if any, there are. Now, all we have to do is: Subscribe user A’s app to a topic “/topic/user-a”, user B’s app to a topic “/topic/user-b” and publish the typing status to receiver’s topic. User A User B Subscribe /topic/user-a /topic/user-b Publish /topic/user-b /topic/user-a Typing started 1 1 Typing stopped 0 0 In order to send data from one device to another device in real time, we will require a socket based connection. There are many options available like Socket.io, Mosquitto.org, RabbitMQ. For this tutorial, we will use RabbitMQ.
  • 4. Run RabbitMQ MQTT Adapter on your server. On android, use the eclipse paho library to create mqtt client. org.eclipse.paho.android.service-1.0.2.jar org.eclipse.paho.client.mqttv3-1.0.2.jar Above 2 versions can be found here: https://github.com/AppLozic/Applozic-Android- SDK/tree/master/mobicomkit/libs Android code to publish data: MqttClient client = new MqttClient(MQTT_URL, userId + "-" + new Date().getTime(), new MemoryPersistence() ); MqttMessage message = new MqttMessage(); message.setRetained(false); message.setPayload(typingStatus).getBytes()); message.setQos(0); client.publish("topic/" + userId, message); client.subscribe("topic/" + userB, 0); Source: https://github.com/AppLozic/Applozic-Android- SDK/blob/09334e9e891b80d143886cb0047c679f00e07a6c/mobicomkit/src/main/java/com/ applozic/mobicomkit/api/ApplozicMqttService.java Step 3: Update typing status real time on UI At the receiver’s end, upon receiving typing status, show and hide the typing indicator accordingly. Below is the android code to receive the typing status
  • 5. @Override public void messageArrived(String s,final MqttMessage mqttMessage) throws Exception { Log.i(TAG, "Received MQTT message: " + new String(mqttMessage.getPayload())); try { if (!TextUtils.isEmpty(s) && s.startsWith(TYPINGTOPIC)) { String typingResponse = mqttMessage.toString(); // Broadcast typing status to the current activity/fragment and display the typing label. } }
  • 6. More resourceful links: Find typing indicator code in Applozic open source chat sdk available in github. https://github.com/AppLozic/Applozic-Android-SDK for light weight Android Chat SDK https://github.com/AppLozic/Applozic-iOS-SDK for light weight iOS Chat SDK On iOS, you can use MQTT Client Framework for sending and receiving data from devices. Source: http://www.applozic.com/blog/how-to-implement-typing-indicator-in-android-chat- app/