Coder Social home page Coder Social logo

konklone / congress-android Goto Github PK

View Code? Open in Web Editor NEW
157.0 14.0 42.0 31.73 MB

Congress for Android, an app for tracking Congress.

Home Page: https://play.google.com/store/apps/details?id=com.sunlightlabs.android.congress

License: Other

Java 100.00%

congress-android's Introduction

Congress for Android

This is the source code for the Eric Mill's Congress app for Android phones. (This app was previously funded and developed for years by the Sunlight Foundation.)

Find the most up-to-date version in the Google Play Store: https://play.google.com/store/apps/details?id=com.sunlightlabs.android.congress

We ship the app using the code found in this repository, with some miscellaneous unversioned API keys and build information placed in app/src/main/res/values/keys.xml.

We use Github Issues for issue tracking.

Setup

When setting this up:

  • copy keys.xml.example to app/src/main/res/values/keys.xml and:
    • fill in propublica_api_key with your Pro Publica API key,
    • fill in propublica_api_endpoint with the base Pro Publica API endpoint you wish to use. By default, this is https://api.propublica.org/congress/v1/.
  • copy tracker.xml.example to app/src/main/res/xml/tracker.xml

If you're using Google Analytics, fill in app/src/main/res/xml/tracker.xml's ga_trackingId field with your Google Analytics profile tracking ID. (Make sure you've set up a profile in Google Analytics first.)

If you're not using Google Analytics, then turn off analytics by setting app/src/main/res/values/keys.xml's debug_disable_analytics field to true.

License

We use a mixed GPLv3 and BSD license for our code in this repository. Generally speaking, the code specific to our Android app is GPLv3, and the code you could reuse in any Java or Android app is BSD.

The repository also contains some miscellaneous .jar files in /libs, who have separate individual licenses.

See LICENSE for complete details.

Release Checklist

Final dev check:

  • Tested on enough emulators to feel confident?
  • Leave any debug stuff commented out or in? (also avoid ever having to do this even temporarily)

Code changes:

  • Bump the android:versionCode and android:versionName in AndroidManifest.xml
  • Bump the android:app_version in strings.xml to match android:versionName
  • Change the android:app_version_older in strings.xml to what's appropriate
  • Update the changelog data in arrays.xml to what's appropriate
  • Commit changes, add tag in git for version "vX.X.X" where X.X.X is the android:versionName
    • git tag -a -m "Tagging vX.X.X" vX.X.X
    • git push --tags

Then, release work:

  • Check keys.xml:
    • is pro_publica_api_endpoint pointing to production?
    • are all debug flags set to false?
  • Produce signed APK version
  • Take any screenshots needed to replace outdated ones
    • Replace any new screenshots in _____ (GitHub?)
  • Store APKs in GitHub
    • into releases/
    • create a Release associated with the tag

congress-android's People

Contributors

divergentdave avatar evelyne24 avatar konklone avatar matrixfrog avatar paultag avatar smpeters avatar tacothedank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

congress-android's Issues

Context menus

Main Menu:

  • Preferences
  • About

Profile and other tabbed activities:

  • Call
  • Visit Website

Icons across the app

Including the app icon, phone/web icons for the profile, and tab icon headers.

YouTube data collection

Use the Senate Hub and House Hub to increase our data stores on legislator YouTube accounts.

Activities with non-UI threads must pause/resume correctly

Flipping the keyboard on any of the screens which do network activity in an external thread and bring up dialogs, will bring up the dialog again and it will not end.

Moreover, we shouldn't need to re-do any network activity when flipping, information should be saved and restored.

"About" screen

An About screen, accessible via the context menu on the MainMenu activity, should have Sunlight Labs' logo, URL, link to the source, and whatever other attributions we want to make (Yahoo! News API, Sunlight Labs API, at the least).

Add "Feedback" menu option

This should open up the Gmail compose screen with the subject filled in, and the To address being an alias we create in-house to receive feedback.

location does not update

I used the location feature in DC and Eleanor Holmes Norton came up. Success! However, when I went home in MD and used the location feature, Eleanor repeatedly showed up instead of my members of Congress.

Better image caching approach?

Try:
BitmapFactory.decodeStream(bis)

where bis is a BufferedInputStream over an InputStream from a URLConnection's getInputStream().

Website URL's not correct

On the legislator profile, we need a better regex or way of displaying URLs. Check out Barney Frank's profile for an example.

Cache photos for only 1 month

The app right now will cache these missing photos and then never look for the replacements. However, there's no way for the phone to tell when it got a "No Photo" and when it got an actual photo.

To solve this, we'll expire our cache after a month. If photo's last modified time was more than a month ago, re-download it.

Better location detection workflow

If the user has location detection entirely off, we don't want the button to just stay disabled without any idea of why. Provide a way for the user to request searching by location, and to take the user to the GPS settings screen if it's off.

"First Time" screen

This screen should introduce users to the app and say what they can do with it.

Should mention the ability to create shortcuts, and to reply to tweets.

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.