Git Product home page Git Product logo

wether-forecast's Introduction

Android Development Challenge

Problem Statement

Build an android app to retrieve weather information based on their searching criteria and show the searched results on the dashboard screen.

Problem Solution

  • Written by Kotlin.
  • Used MVVM design pattern.
  • Used Retrofit as a REST client to call and retrieve data from OpenWeatherMapsAPI.
  • Used Hilt for dependency injection.
  • Accessibility for Disability Supports.

If you want to know more:

Project Structure

The project is built using the MVVM model. The package structure will look like below:

image

App Components

All the architecture components are as follows:

Foundation Components

  • Unit test: mockito, junit4, robolectric

Architecture Components

  • LiveData: Notify views of any data changes.
  • ViewModel: Manage UI-related data in a lifecycle-conscious way.
  • Lifecycles: Manages activity lifecycles of our app.

Features

The Android application is written by Kotlin is able to

  • Retrieve the weather information from OpenWeatherMapsAPI.
  • Allow users to enter the searching term.
  • Proceed to search if the search term length is at least 3 characters.
  • Show the searched results as a list.
  • Able to handle failures like network down, etc.
  • Caching mechanism to prevent the app from generating a bunch of API requests.
  • Manage caching mechanism & lifecycle.
  • Support the disability to read out the text with Talkback.
  • Support the disability to scale large text for those who can't see the text clearly.

Next steps

The application can be enhanced more for

  • Add more local test for ui.
  • Unit test for Exception case (Checked exception issue), ApiService interface.

Note

  • I have done a Unit test for logic code (Repository, ViewModel) and some basic test cases for UI test (View).
  • UI from the requirement is not good enough, need to discuss and improve later.

Runnable app

wheather app screenshot

c9272c39fe9935c76c88

Development

Below are the obligatory requirements that you must meet to run the project:

  1. Adding configuration in your local.properties file.
BASE_URL="<your OpenWeatherMapsAPI domain>"
WEATHER_APP_ID="<OpenWeatherMapsAPI App Id>"

Example:

BASE_URL="https://somedomain.org/"
WEATHER_APP_ID="Your app id string with 32 characters long"
  1. sync your project

wether-forecast's People

Contributors

vantangst avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.