CallMonitor

Description

CallMonitor is an Android application that monitors incoming and outgoing calls and stores the details in phone call log in the background. At launch it also starts a REST API server that can be used to view the call log, current call status and server status. Beside of that the application provides a simple user interface to view the call log and the server configuration.

More detailed information about the application can be found here.

Architecture

The project uses Clean Architecture and Model-View-Intent (MVI) architectural patterns to design and structure the application. Clean Architecture provides a clear separation of concerns, dividing the codebase into distinct layers (UI, Presentation, Domain, Data and Data Source) ensuring scalability and maintainability. The MVI pattern enhances the user interface by emphasizing a unidirectional data flow and enabling a reactive approach to handle UI updates.

Supported Android versions

The application is compatible with Android 6.0 (API level 23) and higher.

Screenshots

Screenshot light theme 1 Screenshot light theme 2
Screenshot dark theme 1 Screenshot dark theme 2

All modules:

Link copied to clipboard

This is the main module of the application containing the main activity, phone call monitoring service and initializers of the dependencies.

Link copied to clipboard

This module contains the data objects of the phone call monitor feature. It is a pure Kotlin module which implements the repository interfaces defined in the "domain" module. It also contains data sources interfaces which are implemented in the "datasource" module.

Link copied to clipboard

This module contains data sources for the functionalities of the application. The data sources are responsible for retrieving, saving or modifying data. Thanks to the layered architecture, the data sources are independent of the rest of the application. This allows the data sources to be easily replaced by other data sources. For example, the current data sources are mostly "in memory" data sources. This means that the data is stored in memory and is therefore not persistent. Such decision was made to meet the requirements of the project. However, if the requirements change, the data sources can be easily replaced by other data sources, such as "database" data sources.

Link copied to clipboard

This module contains the domain objects of the phone call monitor feature. It is a pure Kotlin module which does not depend on any other module. It contains use case classes responsible for the business logic of the application. It also defined repository interfaces which are implemented in the "data" module.

Link copied to clipboard

This module contains the logger component allowing to log messages. This is a shared module which can be used by other modules.

Link copied to clipboard

This module represents the presentation layer of the phone call monitor feature. It contains view models and view state classes that are used by the "ui" module to display data.

Link copied to clipboard

This module contains the server part of the phone call monitor feature. It is a simple Ktor REST server that listens for incoming requests from clients and responses with proper data. The server uses HTTP as the communication protocol and JSON as the data format.

Link copied to clipboard

This module represents the UI layer of the phone call monitor feature. It contains the UI components that are used to display data to the user. The UI components are implemented using the Jetpack Compose library. The UI components are connected to the view models from the "presentation" module.