Skip to content

maximillianh/actioncenter-mobile

 
 

Repository files navigation

EFF Alerts

EFF Alerts is an Ionic app for receiving news and push notifications from EFF.

Copyright (C) 2014-2016 Electronic Frontier Foundation (EFF).

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Table of Contents

Background Info

EFF Alerts is a pager style app that notifies EFF supporters when EFF needs their help.

Although it works on both iOS and Android, the app is only targeting Android as of today. If you need to deploy to iOS as well, please check out the Ionic docs or contact the project maintainer for help.

The app is written using Cordova / Ionic, deploying an Angular webapp inside a UIWebView. This is to reduce the maintenance involved in managing multiple languages and fit with the existing EFF team's expertise.

Getting started

npm install
bower install
gulp build

Setting up Cordova

Install the Cordova CLI tools

sudo npm install -g cordova

Set cordova dependencies up for the app

cordova platform add android
// Required as the localnotification plugin doesn't install correctly via the install_plugins hook
cordova plugin add de.appplant.cordova.plugin.local-notification && cordova prepare

App Configuration

App config is controlled via the node-config module.

To set push credentials, create a local.json file under the config dir and override the CREDENTIALS setting.

Alternately, you can use:

Run tests

gulp test

Running the server

Spins up a local server to serve the app.

NOTE: the app assumes the presence of various plugins that a browser doesn't have, so some actions, e.g. share buttons etc. will not work and will throw errors

gulp watch

Running on device

Gulp exposes two helper methods for running on device, these just wrap the respective ionic commands

gulp runAndroid
gulp runIos

Angular app

See the www/README.md for details

Packages

No packages published

Languages

  • JavaScript 67.6%
  • CSS 18.1%
  • HTML 14.3%