____  ___    _  _     _   _ _____     _______
 / ___|/ _ \  | || |   | | | |_ _\ \   / / ____|
| |  _| | | | | || |_  | |_| || | \ \ / /|  _|
| |_| | |_| | |__   _| |  _  || |  \ V / | |___
 \____|\___/     |_|   |_| |_|___|  \_/  |_____|

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

[Interview Project]: An Android Developer Interview Coding Challenge in MVP

BY: @edgar-trem | CREATED: April 12, 2018, 12:28 a.m. | VOTES: 229 | PAYOUT: $150.46 | [ VOTE ]

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

  1. Create a native Android Mobile App with a Side menu and map as home screen.
  2. 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.
  3. Create a button to pin a new location searched on map by a user.
  4. Add this new location to your set of dummy data and it should show up the next time user starts the app.
  5. Use MVP architecture

My Approach

The challenge pretty easy, I got it done in a couple of hours. Here's the completed product
[IMAGE: https://raw.githubusercontent.com/edTheGuy00/Parkstash-challenge/master/images/image.png]

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

[IMAGE: https://cdn-images-1.medium.com/max/1600/1*p2JvbgEir0BusDiiVHMvIA.png]

So here is How it Wrote the app,
1. We define a Contract, in my case I named it MainContract this is the Glue between the View and the Presenter
2. I created a fragment named MainFragment this will serve as the view. notice that we have to inherit MainContract.View
3. MainActivity will serve as the presenter in this case. Here we need to inherit MainContract.Presenter
4. 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

TAGS: [ #utopian-io ] [ #development ] [ #android ] [ #coding ]

Replies

@mathemandy | April 12, 2018, 3:14 a.m. | Votes: 0 | [ VOTE ]

Was it timed? I mean the interview

@edgar-trem | April 12, 2018, 3:29 a.m. | Votes: 0 | [ VOTE ]

They gave me two days to complete it, I did it in about 5 hours.

@sweetim | April 12, 2018, 3:31 a.m. | Votes: 1 | [ VOTE ]

lol, thats the boss, You getting the role :)
whats gonna happen to Mixion ?

@edgar-trem | April 12, 2018, 3:33 a.m. | Votes: 0 | [ VOTE ]

I'll continue to work on it on my free time like I have for the past few months :)

@codingdefined | April 13, 2018, 4:40 a.m. | Votes: 1 | [ VOTE ]

Thank you for your contribution.

Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

@edgar-trem | April 14, 2018, 11:55 p.m. | Votes: 0 | [ VOTE ]

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?

@utopian-io | April 14, 2018, 12:03 p.m. | Votes: 0 | [ VOTE ]

Hey @edgar-trem I am @utopian-io. I have just upvoted you!

Achievements

  • People loved what you did here. GREAT JOB!
  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Utopian Witness!

Participate on Discord. Lets GROW TOGETHER!
- Vote for my Witness
- Proxy vote to Utopian Witness

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

@steemitboard | April 14, 2018, 4:01 p.m. | Votes: 0 | [ VOTE ]

Congratulations @edgar-trem! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[IMAGE: https://steemitimages.com/70x80/http://steemitboard.com/notifications/payout.png] 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

> Upvote this notification to help all Steemit users. Learn why here!

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>