GithubHelp home page GithubHelp logo

kevinmhankes / jokeapi-android Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 191 KB

List-Detail view for Android utilizing the JokeAPI to display the joke setup in a list, and the joke details in the detail view.

License: Apache License 2.0

Kotlin 100.00%

jokeapi-android's Introduction

JokeAPI-Android

This is an app using Android Architecture Components with Koin as a replacement for Dagger Hilt dependency injection.

NOTE: I have filtered the joke results to not return any jokes that are nsfw, religious, political, racist, sexist, or explicit. The jokes should be appropriate, but there is a chance something slipped through the API's filters.

Introduction

Functionality

The app is composed of 2 main screens

JokeListFragment

Displays 10 jokes from the JokeAPI in a scrollable list. Each joke in the list displays a joke setup and is clickable, which navigates to the joke detail view.

JokeDetailFragment

Displays the selected joke's category, setup, and delivery. A back arrow will be displayed for navigating back to the joke list

Building

You can open the project in Android Studio and press run

Testing

This project uses both instrumentation tests that run on the device and local unit tests that can be run on the computer

Libraries Used

  • Foundation - Components for core system capabilities, Kotlin extensions and support for multidex and automated testing.
    • AppCompat - Degrade gracefully on older versions of Android.
    • Android KTX - Write more concise, idiomatic Kotlin code.
    • Test - An Android testing framework for unit and runtime UI tests.
  • Architecture - A collection of libraries that help you design robust, testable, and maintainable apps. Start with classes for managing your UI component lifecycle and handling data persistence.
    • Data Binding - Declaratively bind observable data to UI elements.
    • Lifecycles - Create a UI that automatically responds to lifecycle events.
    • LiveData - Build data objects that notify views when the underlying database changes.
    • Navigation - Handle everything needed for in-app navigation.
    • Room - Access your app's SQLite database with in-app objects and compile-time checks.
    • ViewModel - Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution.
  • UI - Details on why and how to use UI Components in your apps - together or separate
    • Fragment - A basic unit of composable UI.
    • Layout - Lay out widgets using different algorithms.
  • Third party and miscellaneous libraries
    • Koin for dependency injection
    • Retrofit for networking
    • Timber for additional logging capabilities
    • Mockito Kotlin for improved Mockito testing in Kotlin
    • Mockito for general Mockito testing capabilities
    • Gson for parsing JSON response from the JokeAPI

Notes

  • Most commits are missing due to switching over to a different repository. Normally, I commit early and commit often.
  • I began working on this project with the intention of familiarizing myself with the new Dagger Hilt framework for dependency injection and Kotlin's newer experimental coroutines. After working on learning the new frameworks and beginning the process of building out the app, I was beginning to feel rushed for time a bit given the scope of the app with testing. I eventually decided to pivot into something I was more familiar with, which is Koin. The Dagger Hilt framework seems pretty awesome and I look forward to having more time to acquaint myself with it.
  • Hypothetical next steps given more time:
    • Continue building out the test framework to allow for even greater coverage
    • Include Test Coverage reports from Jacoco to ensure coverage
    • Create Github Actions to automate CI/CD for building, testing, releasing
    • Implement refresh and scroll-down-to-refresh for a better user experience
    • Utilize Material design and adjust the theme and styles so there are less styles in any given layout file and are in a theme instead
    • Continue tweaking the UI to more of a polished look
    • Introduce some animations around the delivery of the joke (it's supposed to be funny, why not enhance it with some cool graphics and animations?)
    • Add the ability to favorite and save jokes to the local database (or Firebase potentially)

jokeapi-android's People

Contributors

kevinmhankes avatar

Watchers

 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.