IkemNwodo / kotlin-telemedicine-demo

A sample application that demonstrates how to build a feature-rich chat app for telemedicine using PubNub Chat and PubNub Kotlin SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PubNub Telemedicine App

Build Status

The DrChat app demonstrates how to build a feature-rich telemedicine chat application using PubNub Chat and PubNub Kotlin SDK. Learn how to add private messaging for patients and doctors and group messaging for doctors to talk about cases. Learn how to build advanced features like online/offline presence indicators, typing indicators, read receipts, and file upload. You can download the project to run on your local machine, and explore the code to see how we built it.

Login View Doctor Dashboard Group Chat

The application demonstrates how to build a chat application using:

Features

  • 1:1 messaging between patients and doctors
  • Group messaging between doctors via cases
  • Fetching history of missed messages
  • Encrypted messages for privacy
  • Offline / online presence indicator
  • Typing indicators to show activity
  • Message read receipts in 1:1 messaging
  • File upload to share images and files

Requirements

PubNub KeySet

  1. Navigate to the PubNub Dashboard and login to your account.

  2. Select an App or create a new App.

  3. Select a Keyset or create a new Keyset.

  4. Enable Presence, Storage & Playback, Files features and select the nearest region. Enable Presence Enable Storage Enable Files

  5. Save changes. Save Changes

Running the project

  1. Clone the GitHub repository.

    git clone https://github.com/pubnub/kotlin-telemedicine-demo.git
  2. Install the project to initialize data.

    cd kotlin-telemedicine-demo/setup
    npm install
  3. Start the initialization. You'll be asked to enter your Publish Key and Subscribe Key from the PubNub Dashboard. You can also optional pass a cipher key to enable message encryption.

    npm start
  4. Start Android Studio and open a project. Wait until the gradle sync process is over.

  5. Select the default configuration if it's available or create the new one. Select Configuration

    To add a new configuration click on Add Configuration / + and select Android App. Select Configuration

    Please enter your configuration name, select Telemedicine.app in Module and click OK. Configuration

  6. Please connect your Android phone or start an emulator and run application with selected configuration. To run application on both emulators you can use Select Multiple Devices. Run on Multiple Devices

    If you need to create new emulator please check next section.

  7. Push random images to device Pictures directory. You can do it directly from Android Studio Terminal or system Terminal.

    cd kotlin-telemedicine-demo
    ./gradlew pushPhotos

Creating an emulator

For this project we suggest to create two Pixel 2 devices with Android Q (API 29) system.

  1. Open AVD Manager - select Tools / AVD Manager. Open AVD

  2. Click Create Virtual Device…, at the bottom of the AVD Manager dialog. AVD

  3. On Hardware Profile page please select Phone category, Pixel 2 hardware, and then click Next. AVD Hardware Profile

  4. Select Android Q system image, then click Next. If you see Download next to the system image, you need to click it to download the system image. You must be connected to the internet to download it. AVD Software

  5. Provide your own device name in AVD Name field and click Finish. AVD Name

  6. Repeat these steps for creating the second emulator.

For more information please follow official guide to create and manage virtual devices.

Changing properties

You can change publish, subscribe and cipher key manually. To do it, please edit a gradle.properties file.

About

A sample application that demonstrates how to build a feature-rich chat app for telemedicine using PubNub Chat and PubNub Kotlin SDK

License:MIT License


Languages

Language:Kotlin 98.4%Language:JavaScript 1.6%