You are required to develop a mobile application for Android using Kotlin. The application should request a certain number of coordinate points (x, y) from a server, and then display the received response in the form of a table and a graph.
The main screen should have a block of informational text, a field for entering the number of points, and a button labeled "Let's Go".
Upon pressing the button, a request is made to the server's API (GET /api/test/points), with the parameter specifying the number of points to request (count).
The server responds with an array of points in JSON format, for example: {" points":[{"x":1.23, "y":2.44},{"x":2.17, "y":3.66}]}
API Specification: https://hr-challenge.interactivestandard.com/swagger-ui.html?urls.primaryName=mobile
If an incorrect number of points is requested, the server returns an error. Additionally, the server might experience occasional outages.
If a response is received from the server, a new screen should display a table with the received coordinate points. Below the table, a graph should be displayed with points connected by straight lines. The points on the graph should be arranged in ascending order of the x-coordinate.
The following additional graph functionalities should be implemented:
- User-scalable functionality
- Support for both portrait and landscape screen orientations
- Capability to share the graph image
Architecture: Clean architecture
Presentation Layer Architecture: Jetpack MVVM
Dependency Injection (DI): Hilt
Navigation: Jetpack Navigation
Asynchronicity: Kotlin Flow & Coroutines
Networking: Retrofit
Logging: Timber
Graphs: MPAndroidChart
Other: Jetpack Startup, Splash Screen, Single Activity, Fragments
The project (view models and mappers) is covered by unit tests using Mockk and kotlinx-coroutines-test.