Android and Real-time are a match made in heaven, using version 4 of the PubNub SDK. Not only do you get the power of the PubNub DSN, the new API gives you a typesafe pure-Java interface, with heavy use of the builder pattern to streamline configuration. Sunny Gleason created a four part series on his starter kit for Android and the V4 SDK. Following Sunny’s guide your real-time Android app will be up and running in no time.
Sunny shows you how to clone his starter kit right from within Android Studio, or create your own new project and pulling in the API from Maven with a small change to your Gradle config. Then he shows you how to navigate the project and customize your keys.
Sending and receiving messages with the native Android SDK is easy. Sunny’s starter kit uses the Jackson library to automatically serialize your POJOs. He also includes a PubSubListAdapter to automatically bridge network code to your UI.
Presence is a way of showing who’s online, what they are doing, and how long since they’ve done something. It’s a crucial part of any high quality collaboration app. This blog shows you how to create a presence list with Sunny’s PresenceListAdapter, as well as configure the connection with different heartbeat settings.
Android is a high performance mobile platform. Thanks to PubNub StreamController APIs you can manage high performance real-time connections by grouping multiple channels into a single unit. Sunny shows you how to add and remove channels from a group, message them in bulk, and even use wildcard subscriptions.