The purpose of this technical challenge is to get an idea of the depth of your android knowledge. There is no specific right answer or approach. There is no specific amount of time that this challenge requires to complete. The requirements laid out below describe what is required at a minium, and some that are optional. It is up to you to decide what concepts, tools and approaches you want to take to meet the minimum requirements. Please feel free to spend as much time as you’d like crafting your solution and we hope you have fun along the way
Your challenge is to build a vertically scrolling list which displays some metadata about a friend. There is no real webservice or backend that is serving this data, there will be a method provided that you will call to obtain a list of dummy data - more info below!
- You MUST use a RecyclerView for your list view/component. Here's some additional documentation
- You MUST use ConstraintLayout in at least one of your layouts. Here's some additional documentation
- At minimum, a friend's first name, last name, birthday and profile image must be displayed in each list item. Use your own creativity on how you would like to design this UI, have fun with it!
- A friend object has a field called
favoriteColor
. This should be used as the background color of the list item container/card - Tapping/clicking a list item row in the list will display an AlertDialog, Toast, Snackbar or some other similar component of your choice with the following message: "Hello ${firstName} ${lastName}!"
- Use the skeleton MainViewModel with an Observable data holder pattern of your choice for passing data to the activity.
- Fetch the friend list data asynchronously
- Handle saving/restoring the ui state to avoid unneccessarily re-loading the friend list if the app goes to background (recents) or gets destroyed/recreated by the system
- The list is displayed in sorted order by the
favoriteColor
. e.g. If there is a total of 3 Friend objects and 2 of them have the samefavoriteColor
, they will be displayed in positions 1 and 2 (the order in the group is not important), and in position 3 will be the friend with a different color. How you choose which color has precedence is not important, only that the items are displayed in order by "group" based onfavoriteColor
- Implement fetching the frends list data from an actual test Flave API that will provide a simple json with friends. You can assume all fields are non-null. Note - there is no icon in this payload for each friend item, unlike the dummy data provided in the MainRepository, so feel free to use whatever you'd like for the icon in the list items.
A shortended snippet of the payload is below:
{
"friends": [
{
"firstName": "LeBron",
"lastName": "James",
"birthday": 1614729949, // unix epoch timestamp
"color": "#03d7fc" // hex color string
},
...
]
}
The public API is https://firebasestorage.googleapis.com/v0/b/flave-web.appspot.com/o/files%2Ffriends.json?alt=media&token=9de95c33-bc2c-40c0-80a2-49b4be3c8abb
- The MainRepository has a public method that can be used to simulate fetching a list of friends.
- You are free to leverage and use any 3rd party library in order to solve the project requirements - just keep in mind you may be asked questions about these libraries
- You don't need to concern yourself with styles, themes, etc. If you would like to put in the extra effort for an elegant UI feel free to do so, but this is not an expectation of this coding challenge
- You DO NOT need to write any Unit Tests. However the testability of your code will be taken into consideration. More on this below
- Please branch OFF of
main
and name your branch with your firstname-lastname and push up your branch to the main repo so we can review. Alternatively you can fork the main repo and pass us your repo link. We should be able to clone the repo and import your project into Android Studio directly so we can make a build (and review your source code)
In addition to being elavuated on meeting the requirements above, we will also be taking into consideration the following:
- Application Architecture
- Android coding conventions
- Knowledge of Android SDK and libraries
- Comments and documentation
- Design decisions and implementation detail
- Unit testability of your code
We encourage you to have fun with this challenege and feel free to add your own "flavor" and humor wherever you can!
GOOD LUCK!!!