Simple Chat App Environment Setup for Android Kotlin

Download Source Application

Download the JetNews app from the GitHub Repository. Select the base-application branch, as this branch contains the base application. This app is a news feed application and will be your starting point when you add chat features.

In a terminal, navigate to an empty folder of your choosing. Enter the following command to clone the Repository.

1

Checkout the base-application branch to begin working with the source application.

1

Watch the video or follow the steps below to set up your environment.

1

Download Android Studio

Download the latest, stable version of Android Studio for your operating system if you don't already have it. This download includes the IDE, Android SDK, and Android Emulator.

Create Android Virtual Device

Create an android virtual device via the Device Manager to emulate the application in a virtual environment.

Add PubNub SDK Dependencies

Open the source application’s build.gradle file. Add the PubNub Dependencies for Kotlin SDK and Chat components for Android at the end of the dependencies block to include the chat sdks.

1

Add Internet Permissions

Open the source application's AndroidManifest.xml file to view the manifest of the application. The PubNub Network API requires internet permissions, otherwise you cannot connect to the PubNub Network. Add the following line in the manifest element, before the application block.

1