Yesterday I got asked to build an Android app from scratch as part of an interview coding challenge. The recruiter asked me to submit the project via GitHub, so I thought I would might as well document it here for anyone interested in the Android developer interview process, and/or anyone looking for tips on their upcoming Interview.
The Challenge
- Create a native Android Mobile App with a Side menu and map as home screen.
- Take a set of dummy data representing locations on map with latitude and longitude. Show these locations on map when a user opens the app using appropriate marker.
- Create a button to pin a new location searched on map by a user.
- Add this new location to your set of dummy data and it should show up the next time user starts the app.
- Use MVP architecture
My Approach
The challenge pretty easy, I got it done in a couple of hours. Here's the completed product
What is MVP? for those if you that do not know, MVP is basically a design style of writing code. MVP stands for Model View Presenter, and when writing code in MVP, you compartmentalize the code to only perform certain function.
- Model - consists of all the code that is responsible for fetching and storing data
- View - is all the code the is related to the UI (what you see in the screen)
- Presenter - all the business logic or the brain of the app.
Here's a pretty diagram of MVP
So here is How it Wrote the app,
- We define a Contract, in my case I named it MainContract this is the Glue between the View and the Presenter
- I created a fragment named MainFragment this will serve as the view. notice that we have to inherit MainContract.View
- MainActivity will serve as the presenter in this case. Here we need to inherit MainContract.Presenter
- Lastly I created the Model as LocationRepo
The LocationRepo is actually only in charge of fetching and saving the data into the database. The entire Model aspect of the MVP architecture actually consists of almost all the data directory. In here you will find the creation of the database, the definition of the only table in the database and the access objects for the database.
Overall this was a pretty fun project to do.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for your contribution.
Chat with us on Discord.Need help? Write a ticket on https://support.utopian.io.
[utopian-moderator]
Thanks,
It seems like contributions can be much more conscience with the score card, But I would think it's a bit more work for you moderators right?
Was it timed? I mean the interview
They gave me two days to complete it, I did it in about 5 hours.
lol, thats the boss, You getting the role :)
whats gonna happen to Mixion ?
I'll continue to work on it on my free time like I have for the past few months :)
Hey @edgar-trem I am @utopian-io. I have just upvoted you!
Achievements
Utopian Witness!
Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Congratulations @edgar-trem! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the total payout received
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP