Show weather data for the current location [Apollo Agriculture Interview Solution], for the Senior Android Engineer Role

Overview

Apollo Agriculture Android Take Home Assignment

Writing Apollo Agriculture App using Android Architecture Components, in 100% Kotlin, using Android Jetpack Components, and in Compose 🚀

Requirements

  • Add a second screen to the app with weather data for the current location. Use the following initial wireframe we've made:

  • The output from our weather API looks like this:

{
 "today": {
 "lowTemp": 23.36,
 "highTemp": 24.66,
 "icon": "CLEAR_DAY",
 "description": "clear sky"
 },
 "tomorrow": {
 "lowTemp": 23.63,
 "highTemp": 24.9,
 "icon": "SCATTERED_CLOUDS_DAY",
 "description": "scattered clouds"
 },
 "dayAfterTomorrow": {
 "lowTemp": 22.73,
 "highTemp": 25.14,
 "icon": "BROKEN_OVERCAST_CLOUDS_DAY",
 "description": "broken clouds"
 }
}

Feel free to use however you think best in the app, it's also available at https://apollo-web-public.s3.eu-west-1.amazonaws.com/eng/android-takehomeassignment/weather.json so feel free to add an API client.

  • Documentation for the API is available in API.md in this folder.
  • Use any libraries for Android that you want, but we will need to be able to build your code to evaluate it.

A few hiccups

I noticed the previews are not rendering since I am injecting the viewmodel in the composables. I need to research and find a way to fix the previews. Found the issue here

I am not able to test the Room setup too, so I will ignore the implementation on the app. The reason is, I am using JUnit5 and Roboelectric doesn't support it.

Prerequisites - Unit Tests

Spek

This allows us to easily define specifications in a clear, understandable, human-readable way. This framework allows you to describe tests and expected behaviors in a more readable way.

To run tests in Android Studio you need to install Spek Framework plugin (search for Spek Framework).

The UI test run normally, either on a device or an emulator, without any special plugin or dependency.

How it's built

Screenshots

I added some screenshots in the screenshots folder, in the root directory of the project. Added some GIFs to also show end to end test on the app

Light Dark GIF
You might also like...
Dots indicator that shows the current position on a View Pager. It does all the work for you with a few customisations.
Dots indicator that shows the current position on a View Pager. It does all the work for you with a few customisations.

Dots What is Dots? Dots is a library that helps in implementing a simple yet effective dots indicator for the View Pagers used in your android code. I

Feature flags solution that is fast, lean, and open-source.

FFS Feature flags solution that is fast, lean, and open-source. Documentation Full documentation available at https://doist.github.io/ffs/. Project FF

RoomJetpackCompose is an app written in Kotlin and shows a simple solution to perform CRUD operations in the Room database using Kotlin Flow in clean architecture.
RoomJetpackCompose is an app written in Kotlin and shows a simple solution to perform CRUD operations in the Room database using Kotlin Flow in clean architecture.

RoomJetpackCompose is an app written in Kotlin and shows a simple solution to perform CRUD operations in the Room database using Kotlin Flow in clean architecture.

Location Service Manager for Kotlin Multiplatform Mobile iOS and android
Location Service Manager for Kotlin Multiplatform Mobile iOS and android

Location Service Manager for Kotlin Multiplatform Mobile iOS and android Features Provides simple permission settings Dramatically reduce the amount o

Simple android application that consumes Rick and Morty API to display characters,episodes,Location
Simple android application that consumes Rick and Morty API to display characters,episodes,Location

Rick and Morty Compose An android app built using Kotlin that consumes Rick and

Whereabouts: an android library which leverages Kotlin concurrency to streamline location fetching

Whereabouts Whereabouts is an android library which leverages Kotlin concurrency

The Superhero app keeps track of the near real-time location of all the volunteers.

Superhero The Superhero app keeps track of the near real-time location of all the volunteers. The app sends requests for emergency tasks to nearby vol

find the top coffee shop near by a given location
find the top coffee shop near by a given location

YelpCoffee&Tea 2 Different Activities (Screens): coffee shop List, coffee shop detail View Android app displays coffee shop locations in specified loc

Location Reminder App build as part of the udacity nanodegree program

Location Reminder a Location Reminder App with notifications that remind the user to do something when the user is at a specific location. built as pa

Durim Aliu 0 Feb 1, 2022
Location-history-viewer - Small compose-desktop app to view data from google's location history

Google Location History Takeout Viewer This application provides a minimalistic

Chris Stelzmüller 3 Jun 23, 2022
Ricky and Morty episode guide using KMM and Apollo GraphQL Native

Ricky And Morty Episodes - Kmm Ricky and Morty episode guide using KMM and Apollo GraphQL Native This is a simple guide on how to create an KMM projec

Julio Ribeiro 2 Apr 15, 2022
Location-permission-handler - Location Permission Handler For Android

Location Permission Handler Easy way to check location permissions for Android 9

null 1 Feb 1, 2022
An Awesome Kotlin Location library to retrieve location merely in 3 lines of code

An Awesome Kotlin Location library to retrieve location merely in 3 lines of code

Birju Vachhani 288 Dec 30, 2022
A simple solution to handling persistent data storage in your Minecraft server.

Modern Data Stores A simple solution to handling persistent data storage in your Minecraft server. This plugin will be used throughout the Modern Plug

Modern Plugins 2 Nov 7, 2022
A simple solution to handling persistent data storage in your Minecraft server.

Modern Data Stores A simple solution to handling persistent data storage in your Minecraft server. This plugin will be used throughout the Modern Plug

Modern Plugins 2 Nov 7, 2022
An Android template project (in Kotlin) with boilerplate and current patterns.

android-starter-v4 An Android template project (in Kotlin) with boilerplate and plumbing, exploring current architecture patterns. A bit too much for

Matthias Urhahn 14 Nov 4, 2022
Coin Stalker App is an android application that displays current crypto currency rates.

Coin-Stalker Coin Stalker App is an android application that displays current crypto currency rates based on modern Android application tech-stacks an

Barış Sağlam 1 Aug 16, 2022