Under each commit you can find the changes I made. Providing a title and the description of the action taken
First make sure that all the component in the layout have a proper name. Using the Constraint Layout, I ordered them as the image provided. I'm using a 32dp margin on top and 16dp for each side. The animation and the button are in a chain group centered in the remaining space of the screen. The animation have a scale of 0.2 trying to match as much as possible the reference.
Separate validation from the error message (in case there is any). Each field have a separate function to validate them individually. Each error is checked separately and re-evaluated after clicking the button. Only if all the validation are correct, the "Input valid" tooltip is shown.
Added the parameter "Loop" into the xml to make sure is repeated forever. Added the animationUpdateListener to track the frame is displayed. Once the animation reach the frame 109 the first frame in the loop is changed to be the frame 131.
Simple screen same as the login, working with a ViewModel for all the logic, I decided to get the data every time the user reach this screen to get the most updated information. I added to this screen 2 TextView, first for "Hello user!" in case the full name is provided, the second one to display the TotalPlanValue Below that a RecyclerView to auto-populate all the different Accounts that the user can have. Clicking in one of the item will allow the user to go to the next screen.
In this screen the user can check the individual account and add money to their Moneybox account. The data is provided by the previous screen via Intent. Once the user click to add money, the new value is shown if everything goes right.
I tried to keep it as clean as possible avoiding any hardcoded string or value using the proper file for it.
Values like User Name or token is stored in Shared Preferences for simplicity, in case that more data is needed offline, I will use Room.
Create a mini version of the Moneybox app that will allow existing users to login, check their account and add money to their moneybox.
In this repository you will find LoginActivity that allows users to enter their username, password and optionally their name. We have implemented a basic screen for you that validates username, password and name against simple regular expressions but makes no calls to the API.
Unfortunately this screen has 3 bugs raised by our testers that they want you to fix and are listed below. If you are struggling to fix any of these bugs, please give it your best attempt and then move onto the next bug or task.
Please re-arrange the views in the LoginActivity to match the expected layout.
If the input entered by the user is correct then they should see a toast saying “Input is valid!”. However if it is not correct we should show an error on the field that is incorrect. Below is the following validation logic:
- Email is not optional and should match EMAIL_REGEX
- Password is not optional and should match PASSWORD_REGEX
- Name is optional, but if it contains any value it should match NAME_REGEX
There is some validation logic in LoginActivity, but it is currently incorrect. Please implement this feature to match this logic.
Above the login button is an animation of an owl and a pig. We would like this animation to play every time the user starts the activity and then loop indefinitely. The logic for this animation should be as follows:
- The animation should start from frame 0 to 109 when the user first starts the activity. See below for animation.

- When the first stage of the animation has finished it should then loop from frame 131 to 158 continuously. See below for animation.

To create animation in our app we use a helpful library called Lottie. This has been added to the project for you, but currently it just plays the animation once and then stops. Please implement the logic as described above.
There is lots of helpful documentation on Lottie here. Please take a look at this page for information on how to loop the animation, play from a min and max frame and detect when an animation ends.
We now want to give some useful functionality to our users. To allow them to log into the app, view and edit their account using our sandbox API.
This screen should be shown after the user has successfully logged in and should show have the following functionality:
- Display "Hello {name} only if they provided it on previous screen"
- Show the 'TotalPlanValue' of a user.
- Show the accounts the user holds, e.g. ISA, GIA, LISA, Pension.
- Show all of those account's 'PlanValue'.
- Shhow all of those account's 'Moneybox' total.
If a user selects one of those accounts, they should then be taken to this screen. This screen should have the following functionality:
- Show the 'Name' of the account.
- Show the account's 'PlanValue'.
- Show the accounts 'Moneybox' total.
- Allow a user to add to a fixed value (e.g. £10) to their moneybox total.
A prototype wireframe of all 3 screens is provided as a guideline. You are free to change any elements of the screen and provide additional information if you wish.
- An android application written in either Java or Kotlin.
- Demonstration of coding style and design patterns.
- Knowledge of common android libraries and any others that you find useful.
- Storage of data between screens.
- Consistency of data between screens.
- Error handling.
- Any form of unit or integration testing you see fit.
- The application must run on Android 5.0 and above.
- The application must compile and run in Android Studio.
Please feel free to refactor the LoginActivity and use any libraries/helper methods to make your life easier.
- Clone this repository
- Create a public repo in github, bitbucket or a suitable alternative and provide a link to the repository.
- Provide a readme in markdown which details how you solved the bugs in part A, and explains the structure of your solution in Part B and any libraries that you may have used.
This a brief summary of the api endpoints in the moneybox sandbox environment. There a lot of other additional properties from the json responses that are not relevant, but you must use these endpoints to retrieve the information needed for this application.
The base URL for the moneybox sandbox environment is https://api-test01.moneyboxapp.com/.
You can log into test your app using the following user:
| Username | Password |
|---|---|
| [email protected] | P455word12 |
In order to make requests https must be used and the following headers must be included in each request.
| Key | Value |
|---|---|
| AppId | 3a97b932a9d449c981b595 |
| Content-Type | application/json |
| appVersion | 5.10.0 |
| apiVersion | 3.0.0 |
To login with this user to retrieve a bearer token you need to call POST /users/login.
POST /users/login
{
"Email": "[email protected]",
"Password": "P455word12",
"Idfa": "ANYTHING"
}
Sample json response
"Session": {
"BearerToken": "TsMWRkbrcu3NGrpf84gi2+pg0iOMVymyKklmkY0oI84=",
"ExternalSessionId": "4ff0eab7-7d3f-40c5-b87b-68d4a4961983", -- not used
"SessionExternalId": "4ff0eab7-7d3f-40c5-b87b-68d4a4961983", -- not used
"ExpiryInSeconds": 0 -- not used
}
After obtaining a bearer token an Authorization header must be provided for all other endpoints along with the headers listed above (Note: The BearerToken has a sliding expiration of 5 mins).
| Key | Value |
|---|---|
| Authorization | Bearer TsMWRkbrcu3NGrpf84gi2+pg0iOMVymyKklmkY0oI84= |
Provides product and account information for a user that will be needed for the two additional screens.
GET /investorproducts
Adds a one off amount to the users moneybox.
POST /oneoffpayments
{
"Amount": 20,
"InvestorProductId": 3230 ------> The InvestorProductId from /investorproducts endpoint
}
Good luck!

