Android Code Challenge - aacml/Recruiting GitHub Wiki

We have created a small technical test for you to showcase how you work.

Your task will be to create a small application that should open links in a web view and use a hierarchy navigation that opens if you touch on a menu button.

Challenges

  • Implement a single activity with a web view. On startup load https://www.mytoys.de into the web view.
  • Implement a navigation drawer with a standard "hamburger menu" button for opening it, and when opened a "close" button at the right.
  • Touching on the menu button should display the menu.
  • The menu entries must be fetched via an API Rest Call
    • The API Endpoint for the navigation entries is https://codechallenge.mobilelab.io/v1/mytoys/navigation and requires the following API-Key N8Nx0OwOvo1iuN2ZkFHZlyVKBVgoIcy4tUHMppO5 as x-api-key request header field.
    • You can preview the response in the terminal if you use curl with the header option to set the x-api-key curl -H 'x-api-key:N8Nx0OwOvo1iuN2ZkFHZlyVKBVgoIcy4tUHMppO5' https://codechallenge.mobilelab.io/v1/mytoys/navigation
    • The JSON structure of the response:
{
	"navigationEntries": [{
		"type": "section",
		"label": "Sortiment",
		"children": [{
			"type": "node",
			"label": "Alter",
			"children": [{
				"type": "node",
				"label": "Baby & Kleinkind",
				"children": [{
					"type": "link",
					"label": "0-6 Monate",
					"url": "http:\/\/www.mytoys.de\/0-6-months\/"
				}, {
					"type": "link",
					"label": "7-12 Monate",
					"url": "http:\/\/www.mytoys.de\/7-12-months\/"
				}]
			}]
		}]
	}]
}

As you can see there are three types of navigationEntries:

  • section: represented in JSON as"type": "section"
  • node: represented in JSON as "type": "node"
  • link: represented in JSON as "type": "link"

Section and nodes can have children. Children is an array that can contain section, node and link entries.

Sections do not have any select interaction, they are only used as visual separator (and should not be clickable).

link has only an URL and a label, no children. All URLs are absolute.

Nodes and Links and buttons have actions that are described below:

Interaction

  • Node Interaction:

    If you touch inside a node a new navigation level must be "pushed onto" the navigation drawer. The entries of the cells are the children of the selected node. The title of the current view is the label of the selected node. Moreover the left button changes to a back button.

  • Back button Interaction: If the user presses the back button the current "navigation level" will be removed from the "stack".

  • Link Interaction:

    If you touch inside a link the navigation drawer should disappear and the web view should load with the url of the selected link.

  • Close Button:

    The navigation drawer should be closed by touching the right close button.

Please have a look at the following gif for a better understand of the functionality:

Hint:

  • Feel free to use any frameworks for networking and JSON processing.

  • You do not need to style your app like the myToys design. Focus on the interaction and functionality.

  • Consider adding the animation (see the existing application) if you have the time.

Requirements:

  • Consider test coverage: unit test and/or UI tests
  • Write a paragraph or two on how you approached the work and what you considered during development
  • We like git. So feel free to send us the link to your git repository on github, bitbucket, etc or send us the project as zipped archive

Additional Information:

We understand that you’ve probably got a full-time job and a personal life. Finishing the above test should definitely be doable in a couple of hours.

If you have any questions, email us and we can add it to this task.

Good luck!