A Kotlin Android app for Iris Msg
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Iris Msg App

This repo is the app for irismsg.io, an sms donation platform. It lets your sign up, create organisations, send messages and processes donations. It's a native Android app, written in Kotlin using Android Jetpack, Retrofit & Dagger

Iris Msg is developed by Open Lab at Newcastle University as an Open source project.

Features

There are two users of this app. A coordinator manages an organisation and sends messages to it's subscribers. A donor uses their sms to forward those messages through the app.

A coordinator can also be a donor for their organisation, but can remove themselves when more donors are added.

Coordinators

  • Sign up in the app and verify their phone number
  • Accept app permissions to send SMS
  • Create an organisation and add subscribers
  • Invite donors to the app who're sent an SMS
  • Compose & send messages to the organisation's subscribers

Donors

  • Receive an donation invite sms
  • Accept app permissions to send SMS
  • Get notifications when a message is sent, asking for donations
  • Have the control to send as many / few messages as they want
  • Can opt-out whenever they want

Code Structure

Folder Contents
activity The app's Activities
api Classes for accessing the Iris Msg api
common Common utilities, types & functions
di The Dagger dependancy injection modules & components
jwt Logic related to json web tokens
model The models returned from the api
receiver Broadcast receivers to handle app messages i.e. sms sent
repo Repositories for ViewModel's to get their data from, uses the api
service External services, i.e. for handling firebase messages
ui Fragments rendered by activities
viewmodel ViewModels for accessing api data

Libraries used

Conventions

Mock api

The api can be swapped for a fake implementation for development, see AppModule

View Transitions

A small Finite State Machine (fsm) is used to handle multiple views in a single activity. The activity will have an enterState() method which transitions the state and ActivityName.State associated enum to define what states the views can be in.

Api Logic

Api-related logic should not be in the fragments, instead it bubbles up events or messages for the activity to handle it.

Event bus

An event bus is used to communicate between some classes, i.e. Activities and BroadcastReceivers.