Sobes.tech
Middle — Senior

Display of screen color depending on citizen data received

livecode

Task condition

To fulfill the requirements of clean architecture, the following functionality should be added:

  1. Make an HTTP request to the backend to retrieve user information. The server will return JSON in the following format:
{
  "id": "string",
  "age": "18",
  "gender": ["MALE", "FEMALE"]
}
  1. Use Jetpack Compose to draw the background of the entire application: if the response contains the value FEMALE – set the color to red, if MALE – black.
  2. Apply any suitable design pattern.
  3. Connect any dependency injection container.
  4. It is assumed that all necessary libraries (JSON converter, Retrofit, Ktor, etc.) are already included in the project.