forked from WhiteHouse/wh-app-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d861525
commit cfdffe8
Showing
212 changed files
with
8,548 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# built application files | ||
*.apk | ||
*.ap_ | ||
|
||
# files for the dex VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# generated files | ||
bin/ | ||
gen/ | ||
out/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Eclipse project files | ||
.classpath | ||
.project | ||
|
||
# IntelliJ project files | ||
.idea/ | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[submodule "contrib/actionbarsherlock"] | ||
path = contrib/actionbarsherlock | ||
url = git://github.com/JakeWharton/ActionBarSherlock.git | ||
ignore = dirty | ||
[submodule "contrib/viewpagerindicator"] | ||
path = contrib/viewpagerindicator | ||
url = git://github.com/JakeWharton/Android-ViewPagerIndicator.git | ||
ignore = dirty | ||
[submodule "contrib/android-undergarment"] | ||
path = contrib/android-undergarment | ||
url = git://github.com/eddieringle/android-undergarment.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="gov.whitehouse" | ||
android:versionCode="2" | ||
android:versionName="2.0" > | ||
<!-- | ||
The package name MUST be changed if you intend to fork and customize this app. The most | ||
efficient way to do this is to use an IDE with refactoring support to rename the entire | ||
package in all places and move the files into the new package directory. | ||
--> | ||
|
||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
<uses-permission android:name="android.permission.VIBRATE" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.BROADCAST_STICKY" /> | ||
|
||
<application android:name=".ui.WhiteHouseApplication" | ||
android:icon="@drawable/ic_launcher" | ||
android:theme="@style/Theme.WhiteHouse" | ||
android:label="@string/app_name"> | ||
<activity android:name=".ui.activities.app.HomeActivity" android:label="Your App Label"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".ui.activities.app.ArticleListActivity" /> | ||
<activity android:name=".ui.activities.app.PhotoGalleryActivity" /> | ||
<activity android:name=".ui.activities.app.VideoGalleryActivity" /> | ||
<activity android:name=".ui.activities.app.LiveFeedActivity" /> | ||
<activity android:name=".ui.activities.app.FavoritesActivity" /> | ||
<activity android:name=".ui.activities.app.ArticleViewerActivity" /> | ||
<activity android:name=".ui.activities.app.VideoPlayerActivity" | ||
android:screenOrientation="landscape" /> | ||
<activity android:name=".ui.activities.app.WHPreferencesActivity" /> | ||
|
||
<receiver android:name="com.urbanairship.CoreReceiver"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
<action android:name="android.intent.action.ACTION_SHUTDOWN" /> | ||
</intent-filter> | ||
</receiver> | ||
<receiver android:name=".receivers.BootReceiver"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
<action android:name="android.intent.action.ACTION_SHUTDOWN" /> | ||
</intent-filter> | ||
</receiver> | ||
|
||
<receiver android:name=".receivers.PushReceiver"></receiver> | ||
|
||
<service android:name=".services.FeedService" /> | ||
<service android:name=".services.LiveService" /> | ||
<service android:name="com.urbanairship.push.PushService" | ||
android:process=":com.urbanairship.push.process" /> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
# White House for Android mobile application | ||
|
||
A native Android (Java) app designed to fetch, cache, and display | ||
multiple feeds containing articles, photos, and live and on demand | ||
video. These are displayed in a web view. Includes support for push | ||
notifications. | ||
|
||
This application is under active development and will continue to be | ||
modified and improved over time. | ||
|
||
## Goals | ||
|
||
By releasing the source code for this app we hope to empower other | ||
governments and organizations to build and release mobile apps to | ||
engage their own citizens and constituencies. In addition, public | ||
review and contribution to the application's code base will help | ||
strengthen and improve the app. | ||
|
||
## Requirements | ||
|
||
1. Android 2.2 "Froyo" or higher | ||
2. RSS feeds for content to be aggregated and displayed by the app | ||
|
||
## Recommended | ||
|
||
1. Android 3.1 "Honeycomb" or higher is required for live video streaming. | ||
|
||
## Usage | ||
|
||
Mobile developers will be able to configure the application to | ||
retrieve and display content from arbitrary RSS feeds. The developer | ||
will be able to configure the app to receive push | ||
notifications. Placeholder assets may be replaced to customize the | ||
app's look and feel. | ||
|
||
### Building the App | ||
|
||
The Android SDK for API level 16 is require to build the app. | ||
|
||
The White House app uses the following libraries, which are all | ||
included as submodules in `contrib/`: | ||
|
||
* [ActionBarSherlock][] - action bar for older versions of Android | ||
* [ViewPagerIndicator][] - paging indicators widgets | ||
* [Undergarment][] - slide-out view (side nav) support library | ||
|
||
To initialize the submodules, run: | ||
|
||
git submodule update --init | ||
|
||
The following libraries are included as source: | ||
|
||
* [Zepto.js][] | ||
* [Underscore.js][] | ||
|
||
### Code Style | ||
|
||
Contributers are expected to adhere to the official [Android | ||
Code Style Guidelines][style]. | ||
|
||
|
||
NOTE: Setting up the application and configuring it for use in your | ||
organization's context requires Android development experience. The | ||
application ships with a similar design to what is used in the White | ||
House for Android mobile application. The application ships with | ||
"white label" placeholder assets that should be replaced by the | ||
developer. | ||
|
||
##Roadmap | ||
|
||
Have an idea or question about future features for White House for | ||
Android? Let us know by opening a ticket on GitHub, tweeting @WHWeb, | ||
or via our tech feedback form: | ||
http://www.whitehouse.gov/tech/feedback. | ||
|
||
##Contributing | ||
|
||
Anyone is encouraged to contribute to the project by | ||
[forking][] and submitting | ||
a pull request. (If you are new to GitHub, you might start with a | ||
[basic tutorial][].) | ||
|
||
By contributing to this project, you grant a world-wide, royalty-free, | ||
perpetual, irrevocable, non-exclusive, transferable license, free of | ||
charge, to any person obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, copy, | ||
modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the conditions that any appropriate copyright | ||
notices and this permission notice are included in all copies or | ||
substantial portions of the Software. | ||
|
||
All comments, messages, pull requests, and other submissions received | ||
through official White House pages including this GitHub page are | ||
subject to the Presidential Records Act and may be archived. Learn | ||
more http://WhiteHouse.gov/privacy | ||
|
||
## License | ||
|
||
This project constitutes a work of the United States Government and is | ||
not subject to domestic copyright protection under 17 USC § 105. | ||
|
||
However, because the project utilizes code licensed from contributors | ||
and other third parties, it therefore is licensed under the MIT | ||
License. http://opensource.org/licenses/mit-license.php. Under that | ||
license, permission is granted free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the conditions that any appropriate copyright notices and this | ||
permission notice are included in all copies or substantial portions | ||
of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
|
||
|
||
|
||
[ActionBarSherlock]: http://actionbarsherlock.com/ | ||
[ViewPagerIndicator]: https://github.com/JakeWharton/Android-ViewPagerIndicator | ||
[Undergarment]: https://github.com/eddieringle/android-undergarment | ||
[Underscore.js]: http://underscorejs.org/ | ||
[Zepto.js]: http://zeptojs.com/ | ||
|
||
[style]: http://source.android.com/source/code-style.html | ||
[forking]: https://help.github.com/articles/fork-a-repo | ||
[basic tutorial]: https://help.github.com/articles/set-up-git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
transport = helium | ||
developmentAppKey = Your development app key | ||
developmentAppSecret = Your development app secret | ||
productionAppKey = Your production app key | ||
productionAppSecret = Your production app secret | ||
inProduction = false |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width"> | ||
<script type="text/javascript" src="file:///android_asset/zepto.min.js"></script> | ||
<script type="text/javascript" src="file:///android_asset/underscore-min.js"></script> | ||
<script type="text/javascript" src="file:///android_asset/wh.js"></script> | ||
<link rel="stylesheet" type="text/css" href="file:///android_asset/wh.css"></link> | ||
</head> | ||
<body> | ||
<script id="video-template" type="text/template"> | ||
<a href="http://www.youtube.com/watch?v=<%= videoId %>"> | ||
<div class="video-thumbnail"> | ||
<img class="thumbnail" src="http://img.youtube.com/vi/<%= videoId %>/0.jpg" /> | ||
<img class="play-button" src="file:///android_asset/play.png" /> | ||
</div> | ||
</a> | ||
</script> | ||
<script id="template" type="text/template"> | ||
<h1><%= title %></h1> | ||
<p class="dateline"> | ||
by <%= creator %><br /> | ||
<%= date %> | ||
</p> | ||
<div class="content"> | ||
<%= description %> | ||
</div> | ||
<div class="branding"><img src="file:///android_asset/branding.png" /></div> | ||
</script> | ||
<div id="article"></div> | ||
</body> | ||
</html> |
Oops, something went wrong.