Android application: Difference between revisions

From Aquarium-Control
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
* ventilation
* ventilation


The main {{app}} module contains the AndroidManifest and the main activity (As of November 2025, the app only uses one activity).
The main <code>app</code> module contains the AndroidManifest and the main activity (As of November 2025, the app only uses one activity).
The activity contains the navigation {{NavHost}} in {{onCreate}}.
The activity contains the navigation <code>NavHost</code> in <code>onCreate</code>.


None of the other modules has a dependency to the main {{app}} module.
None of the other modules has a dependency to the main <code>app</code> module.


The {{common}} module provides low-level functionalities and layout elements used in various places.
The <code>common</code> module provides low-level functionalities and layout elements used in various places.
The following functionalities are located in {{common}} module:
The following functionalities are located in <code>common</code> module:
* {{DataFetchResult}}: A wrapper class indicating the status of data fetching operation ({{Success}}, {{Error}}, {{Loading}}, {{Empty}}).
* <code>DataFetchResult</code>: A wrapper class indicating the status of data fetching operation (<code>Success</code>, <code>Error</code>, <code>Loading</code>, <code>Empty</code>).
* {{WebApiParams}}, {{WebApiPostRequest}}, {{WebApiPostRequestExecution}}, {{WebApiUrls}}: Classes and objects used for communication from the app to the server.
* <code>WebApiParams</code>, <code>WebApiPostRequest</code>, <code>WebApiPostRequestExecution</code>, <code>WebApiUrls</code>: Classes and objects used for communication from the app to the server.
* {{ControllerProfileDao}}, {{ControllerProfileDatabase}}: Classes which provide Room database functionality.
* <code>ControllerProfileDao</code>, <code>ControllerProfileDatabase</code>: Classes which provide Room database functionality.
* Various classes used for dependency injection (Hilt)
* Various classes used for dependency injection (Hilt)
* {{SetValsSanityCheckResult}}: Class used for to communicate status of set values for {{heating}} and {{ventilation}} module.
* <code>SetValsSanityCheckResult</code>: Class used for to communicate status of set values for <code>heating</code> and <code>ventilation</code> module.
* {{ControllerProfile}}: Class containing the profile data of the server (address, port, credentials, ...)
* <code>ControllerProfile</code>: Class containing the profile data of the server (address, port, credentials, ...)
* {{GlobalConstants}}: Mainly UI-related strings (non-context-related) and some minor functional constants
* <code>GlobalConstants</code>: Mainly UI-related strings (non-context-related) and some minor functional constants
* Composable functions for the main drop down menu
* Composable functions for the main drop down menu
* Composable functions for the theme
* Composable functions for the theme
* Composable functions for hyperlinks, text edit fields, headline
* Composable functions for hyperlinks, text edit fields, headline
* {{ViewNavigationRoutes}}: Object containing the routing information processed in main {{app}} module
* <code>ViewNavigationRoutes</code>: Object containing the routing information processed in main <code>app</code> module
* {{ScreenshotTestHelper}}: Helper class for executing the instrumented snapshot testing using the emulator.
* <code>ScreenshotTestHelper</code>: Helper class for executing the instrumented snapshot testing using the emulator.


=== Layer structure ===
=== Layer structure ===
Line 43: Line 43:
=== Instrumented tests ===
=== Instrumented tests ===
== Release procedure ==
== Release procedure ==
<code>

Revision as of 16:00, 19 November 2025

The app is available in the Play store.

Requirements

Architecture

The app uses Jetpack Compose, Dagger/Hilt and aims to implement a clean architecture.

Module structure

Besides the main app module, the app consists of the following library modules:

  • balling
  • common
  • controller
  • feed
  • heating
  • info
  • overview
  • refill
  • schedule
  • timedata
  • ventilation

The main app module contains the AndroidManifest and the main activity (As of November 2025, the app only uses one activity). The activity contains the navigation NavHost in onCreate.

None of the other modules has a dependency to the main app module.

The common module provides low-level functionalities and layout elements used in various places. The following functionalities are located in common module:

  • DataFetchResult: A wrapper class indicating the status of data fetching operation (Success, Error, Loading, Empty).
  • WebApiParams, WebApiPostRequest, WebApiPostRequestExecution, WebApiUrls: Classes and objects used for communication from the app to the server.
  • ControllerProfileDao, ControllerProfileDatabase: Classes which provide Room database functionality.
  • Various classes used for dependency injection (Hilt)
  • SetValsSanityCheckResult: Class used for to communicate status of set values for heating and ventilation module.
  • ControllerProfile: Class containing the profile data of the server (address, port, credentials, ...)
  • GlobalConstants: Mainly UI-related strings (non-context-related) and some minor functional constants
  • Composable functions for the main drop down menu
  • Composable functions for the theme
  • Composable functions for hyperlinks, text edit fields, headline
  • ViewNavigationRoutes: Object containing the routing information processed in main app module
  • ScreenshotTestHelper: Helper class for executing the instrumented snapshot testing using the emulator.

Layer structure

Test strategy

Unit tests

Compose preview screenshot tests

Instrumented tests

Release procedure