Ipso Facto

By Gloria Friesen

Congress Reference Mobile Application

Current Version: 1.3 - 06.16.2017

Description

Mobile application built with Android allowing users to search by location to find their congressional legislators.

Intended Users

Politically engaged citizens.

Installation/Setup

  • In the terminal, run: $ git clone <https://github.com/GloriaFriesen/ipso-facto>
  • Open Android Studio and select 'Open an existing Android Studio project'
  • Find project Ipso Facto on local machine
  • In Android Studio, run app on emulator or connected Android device

Objectives

Week 1:

  • 3 (minimum) activities
    • MainActivity
    • ContactActivity
    • AboutActivity
    • LegislatorListActivity
  • Display list of information
    • Display hard coded list of legislators in LegislatorsActivity
  • Implement adapters
    • ArrayAdapter to display list of legislators
  • Gather user input and pass to another activity
    • EditText on MainActivity will pass user inputted state to LegislatorActivity
  • Validate forms
    • Use autocomplete, user needs to selected from predetermined array of states
    • Add if/else to prevent user from submitting search without selecting a state
  • Use ButterKnife to bind views
  • Implement View.OnClickListener
  • Include custom typeface

Week 2:

  • Implement OkHttp to retrieve data from a backend
    • Use ProPublica API to retrieve legislator data
  • Create data model (Legislator.java)
    • Name
    • Party
    • Role
  • Display list of information using a RecyclerView
    • Display list of legislators in state from API response
      • Currently, able to display list of senators from user's inputted state
      • Need to implement logic to take full state name from user input and convert to state abbreviation to plug into API
      • Need to add functionality for user to choose search between senators and representatives
    • Include name, party, and role
    • Clickable, will send to detail view of that legislator
  • Use fragments and PageAdapter to swipe through views
    • Display complete legislator information
      • PageAdapter is in place, displays initial API response with name, party, and role
      • Need to implement 2nd API call using legislator id to obtain more detailed information
    • Phone and websites will be clickable to initiate implicit intent
  • Incorporate implicit intent
    • Need to implement 2nd API call using legislator id to obtain more detailed information
    • Phone call
    • Times Website
    • Gov website

Week 3:

  • Firebase user authentication
    • Sign in screen
    • Register screen
  • Save and retrieve data using Firebase
  • Firebase-RecyclerAdapter to display from database
    • Allow users to 'favorite' a legislator
    • Retrieve list from database
  • Use SharedPreferences to save an important piece of data in your application
  • Use progress dialog to inform users of login status

Week 4:

  • Include 2 (minimum) gesture listeners, animations, or utilize camera
    • Implement drag to reorder saved legislators
    • Implement swipe to delete saved legislator
    • Implement animation when moving saved legislator
  • Implements alternate resource
    • Landscape layout
      • activity_contact
      • activity_create_account
      • activity_login
      • activity_legislator_detail
      • activity_main
  • Publish to Google Play

Known Bugs

  • There were a lot of bugs along the way, but I think I've smashed them all. If you find to the contrary, please let me know.

Support and contact details

Questions? Concerns? Suggestions? Reach out to me via github: https://github.com/GloriaFriesen.

Technologies Used

  • Android
  • Java
  • XML
  • Gradle
  • Firebase
  • ProPublica API

License

This software is licensed under the MIT license. Copyright (c) 2017 Gloria Friesen.