Site icon Android Tutorial Online

An app that shows harry potter characters and their details

WezaCare Android Developer Test

User Stories

Build an app using kotlin/Java on android using harry potter data from the Harry Potter public API Requirements:

  1. The app should have a home screen that displays a list of Harry Potter characters retrieved from the API.
  2. When the user clicks on a character, they should be taken to a detail screen that displays more information about that character, such as their name, role, house, wand, etc.
  3. The app should have a search functionality that allows the user to search for a specific character by name or house. The search results should be displayed in a list view.
  4. The app should have a unit test that checks if the API integration is working properly.

Screenshots

I added some screenshots in the screenshots folder, in the root directory of the project to show end to end test on the app.

App architecture

The Android application gathers the layers into three packages:

UI (Presentation) layer

The role of the UI layer (or presentation layer) is to display the application data on the screen. Whenever the data changes, either due to user interaction (such as pressing a button) or external input (such as a network response), the UI should update to reflect the changes.

Domain layer

The domain layer is an optional layer that sits between the UI and data layers. The domain layer is responsible for encapsulating complex business logic, or simple business logic that is reused by multiple ViewModels. This layer is optional because not all apps will have these requirements.

Data layer

The data layer of an app contains the business logic. The business logic is what gives value to your app—it’s made of rules that determine how your app creates, stores, and changes data. The data layer is made of repositories that each can contain zero to many data sources.

Tech Stack.

UI and Unit Tests

The screenshot below shows the tests that are done on the repo:

Unit Tests on Network Module

The Unit Tests here test the call to the Harry Potter API

GitHub

View Github

Exit mobile version