Skip to content

An Android-Kotlin-MVVM application that provides civic data intended to provide educational opportunities to the U.S. electorate using data provided by the Google Civic Information API.

License

Notifications You must be signed in to change notification settings

ryanw-mobile/nd940-cap-advanced-android-programming-project

Repository files navigation

Political Preparedness Build Status

Political Preparedness is a Capstone project I have submitted for graduating from the Udacity Android Developers Kotlin Nanodegree program in September 2021. As already being assessed in previous coursework, Udacity did not award extra marks for writing tests in this project.

So I have followed a practical approach - by submitting what they have asked for in the rubric in order to graduate. After graduation, now I keep on refactoring the codes, improving the UI layout and adding tests to this project.

Screenshot1 Screenshot2 Screenshot3 Screenshot4 Screenshot5 Screenshot6 Screenshot7

This app demonstrates the following views and techniques:

  • Retrofit to make api calls to an HTTP web service.
  • Moshi which handles the deserialization of the returned JSON to Kotlin data objects.
  • Glide to load and cache images by URL.
  • Room for local database storage.
  • Coroutines as a substitution of RxJava for asynchronous/non-blocking tasks.
  • Dagger Hilt for dependency injection
  • Timber for logging
  • Hamcrest for assertions in tests
  • Travis CI for Continuous Integration

It leverages the following components from the Jetpack library:

In addition the following features are included:

  • Device permission
  • Device location
  • Dark theme support

Setting up the keystore

  • Android keystore is not being stored in this repository. You need your own keystore to generate the apk / App Bundle

  • You need to have your own Civic API key from Google: the Google Developers Console

  • To ensure sensitive data are not being pushed to Git by accident, the keystore and its passwords are kept one level up of the project folder, so they are not managed by Git.

  • If your project folder is at /app/nd940-cap/, the keystore file and keystore.properties should be placed at /app/

  • The format of keystore.properties is:

       store=/app/release-key.keystore
       alias=<alias>
       pass=<alias password>
       storePass=<keystore password>
       civicApiKey="<your API Key here>"
    

Building the App

Build and install on the connected device

./gradlew installDebug
// or
// ./gradlew installRelease
  • Options are: Debug, Release
  • Debug builds will have an App package name suffix .debug

Build and sign a bundle for distribution

After August 2021, all new apps and games will be required to publish with the Android App Bundle format.

./gradlew clean bundleRelease

Build and sign an apk for distribution

./gradlew clean assembleRelease
  • The generated apk(s) will be stored under app/build/outputs/apk/
  • Other usages can be listed using ./gradelew tasks

About

An Android-Kotlin-MVVM application that provides civic data intended to provide educational opportunities to the U.S. electorate using data provided by the Google Civic Information API.

Topics

Resources

License

Stars

Watchers

Forks

Languages