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 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.
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.
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.
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.