Skip to content

Chat Frameworks and Options

Nicholas LaBelle edited this page Oct 4, 2019 · 12 revisions

Chat Frameworks and Options

Development Options

Option 1: ListView approach

  1. I would not recommend this option.
  2. Here is an example basic program with a listview: simple-chat-application
  3. This option uses a ListView which has the problem of increased loading time.

Option 2: Using Flutter to build a WebGui.

  1. This option has the benefit of being more platform agnostic.
  2. For building a Chat application with Flutter you only require 4 dart files: flutter build a chat app
  3. Integrating Flutter into an existing Android project can be done by following the steps in this link: Flutter Integration

Option 3: RecyclerView Approach

  1. It would use a Recycler view to organize a list of messages.
  2. A message is itself a view organized in horizontal linear.
  3. this is an example of a chat activity built using recycler view: Recycler View
  4. The Recycler View has the benefit of not loading everything into video memory at once.

Option 4: Using Chat SDK Android(CSA) to build project based on Open Source

  1. This an entire open source frontend for a project.
  2. In order to download CSA the steps are included in this link: Adding CSA
  3. One issue with this approach would be that there is probably significant parts of the code that will have to be removed or replaced because CSA is designed to work with a server through a network adaptor.

Winner based on Option 3: Chat Example Prototype

This prototype is based on a Recycler View and has a basic model view and adapter setup. Using this prototype as basis is our best solution based on my research. All the other options require to much work and usually contain outdated code.

  • The ChatUI handles data via a View Model Presenter setup.
  • ChatAppMsgDTO contains a basic model which has a message type and message content additional items can be easily added. The model is independent but necessary to make the chat work.
  • ChatAppMsgAdapter contains the presenter and handles the recyclerView list and its objects.
  • ChatAppMsgViewHolder contains and instantiates each individual message view.
  • While the MainActivity handles the rest of the View.