Skip to content

Real time Messaging

Subrat Thayal edited this page Nov 7, 2020 · 13 revisions

Overview

This guide will show you how to configure an Android app to handle real-time messaging such as a chat client or group texting app. There are several approaches you can take to achieve this.

PubNub

One approach is to use the PubNub service to send and receive real-time messages. PubNub enables low-latency real-time apps that work across any number of platforms including Android, iOS, and Javascript.

Setup

PubNub can be setup very quickly using this setup guide for their Android SDK. In short, their SDK is contained within two JARs that need to be added to your app's libs folder. You can also watch this setup video to get a better look.

Usage

PubNub works by allowing any number of clients to subscribe and send messages to any number of different channels. All clients subscribed to a channel will get messages sent to that channel in real-time.

PubNub

To subscribe and send messages to a channel, we leverage the easy-to-use Android SDK. Check out this step-by-step tutorial as well as this handy quickstart guide. We can also take a look at the Android PubNub Code which includes a detailed README. A complete example of using PubNub can be found within this example.

If we want to use PubNub as a service such that the messages are being received even when the app isn't open, we can check out this simple example which describes how to setup a PubNubService which subscribes to a channel and receives messages starting up as soon as the device boots. This solution is expanded on in this stackoverflow post.

Mirrorfly

Mirrorfly is a power-packed real-time messaging solution has inbuilt Chat API for web and messaging SDK for mobile apps (Android, iOS) that helps to integrate chat, audio, video functionality into any platforms. More secure, highly scalable & customize.

Contus Fly

Contus Fly, an instant chat app solution provide chat API for a website and messaging SDK for Android & iOS, equipped with voice/video calling feature has set on a journey to create seamless connectivity in powering the video and voice functionality through WebRTC.

Sinch

Check out this detailed guide for creating a real-time messaging client using Sinch.

Applozic

Applozic powers real time chat and messaging on android, iOS, phonegap and web apps. Applozic Chat SDK allows developers to add whatsapp like chat capabilities to their apps including group chat, image, file, location sharing, audio/video messages, contextual chat and a lot more.

Refer to the Android Chat SDK to get started. Check out this detailed instruction for adding a real time chat sdk into your Android, iOS, Phonegap and Web app.

EnableX.io

EnableX offers developers a comprehensive channel of communications APIs (SMS, Messaging, Voice, Video and other collaborative tools) and all the necessary toolkits to develop innovative and engaging communication experience. Check out our SDKs and detailed guides for creating real-time messaging or try it out for free.

References

Finding these guides helpful?

We need help from the broader community to improve these guides, add new topics and keep the topics up-to-date. See our contribution guidelines here and our topic issues list for great ways to help out.

Check these same guides through our standalone viewer for a better browsing experience and an improved search. Follow us on twitter @codepath for access to more useful Android development resources.

Clone this wiki locally