Skip to content

Commit

Permalink
Initial version.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquitolabs committed Sep 19, 2017
1 parent e154b0f commit 32b72d3
Show file tree
Hide file tree
Showing 145 changed files with 10,572 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Referèndum 1-O

L'1 d'Octubre ja s'acosta i a causa de la censura i la persecució de drets democràtics fonamentals com són la llibertat d'expressió (tancament de pàgines web, requisaments de cartells...) i la llibertat de correspondència (vulnerant així la privacitat), un grup de professionals de les TIC ens hem vist empesos a crear una aplicació per tal de mantenir informada la població i garantir que tothom pugui exercir el seu dret a decidir.

Funcionalitats:

* Accedeix a tota la informació de Twitter sense necessitat de ser-ne usuari.
* Troba el teu col·legi electoral.
* Comparteix un reguitzell de materials gràfics (cartells, díptics...) a favor del dret a decidir.
* Mantén-te informat de qualsevol novetat a través de les notificacions de l'aplicació.

Aquesta aplicació és de codi obert per tal que tothom pugui replicar-la.

## Descàrrega

* Android: https://play.google.com/store/apps/details?id=com.referendum.uoctubre
* iOS: Pròximament estarà disponible.

## Compilació

Per a compilar l'aplicació, us caldrà el següent:
* Crear un compte de Firebase i copiar-ne el fitxer `google-services.json`.
* Canviar l'API key de Google Maps a l'`AndroidManifest.xml`.
* Crear una aplicació de Twitter i copiar-ne les claus a `Constants.java`.
* Afegir els següents fitxers a Firebase Storage:
* `hashtags.json`
* `imatges.json`
* `colegis.json` (i `colegis_mock.json` per a compilacions de debug)

Al directori `data` hi trobareu exemples del format de cadascun dels fitxers.

## Llicència

L'aplicació està llicenciada sota la llicència [Apache License 2.0](https://github.com/mosquitolabs/referendum_1o/blob/master/LICENSE).

Si desitges contribuir a millorar l'aplicació, envia'ns els "pull requests" que creguis convenients!
25 changes: 25 additions & 0 deletions android-maps-extensions/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apply plugin: 'com.android.library'

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

android {
compileSdkVersion 26
buildToolsVersion '26.0.1'

defaultConfig {
minSdkVersion 21
}
dexOptions {
preDexLibraries = true
}
lintOptions {
abortOnError false
}
}

dependencies {
compile 'com.google.android.gms:play-services-maps:11.2.2'
compile 'com.android.support:support-v4:26.1.0'
}
11 changes: 11 additions & 0 deletions android-maps-extensions/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.androidmapsextensions"
android:versionCode="20300"
android:versionName="2.3.1-SNAPSHOT">

<uses-sdk tools:overrideLibrary="com.google.android.gms, com.google.android.gms.base, com.google.android.gms.maps, com.google.android.gms.tasks" />

<application />

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Copyright (C) 2013 Maciej Górski
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.androidmapsextensions;

import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;

public class AnimationSettings {

public static final long DEFAULT_DURATION = 500L;

public static final Interpolator DEFAULT_INTERPOLATOR = new LinearInterpolator();

private long duration = DEFAULT_DURATION;

private Interpolator interpolator = DEFAULT_INTERPOLATOR;

public AnimationSettings duration(long duration) {
if (duration <= 0L) {
throw new IllegalArgumentException();
}
this.duration = duration;
return this;
}

public long getDuration() {
return duration;
}

public Interpolator getInterpolator() {
return interpolator;
}

public AnimationSettings interpolator(Interpolator interpolator) {
if (interpolator == null) {
throw new IllegalArgumentException();
}
this.interpolator = interpolator;
return this;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof AnimationSettings)) {
return false;
}
AnimationSettings other = (AnimationSettings) o;
if (duration != other.duration) {
return false;
}
return interpolator.equals(other.interpolator);
}

@Override
public int hashCode() {
// TODO: implement, low priority
return super.hashCode();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Copyright (C) 2013 Maciej Górski
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.androidmapsextensions;

import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.PatternItem;

import java.util.List;

public interface Circle {

boolean contains(LatLng position);

LatLng getCenter();

<T> T getData();

int getFillColor();

@Deprecated
String getId();

double getRadius();

int getStrokeColor();

List<PatternItem> getStrokePattern();

float getStrokeWidth();

Object getTag();

float getZIndex();

boolean isClickable();

boolean isVisible();

void remove();

void setCenter(LatLng center);

void setClickable(boolean clickable);

void setData(Object data);

void setFillColor(int fillColor);

void setRadius(double radius);

void setStrokeColor(int strokeColor);

void setStrokePattern(List<PatternItem> strokePattern);

void setStrokeWidth(float strokeWidth);

void setTag(Object tag);

void setVisible(boolean visible);

void setZIndex(float zIndex);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* Copyright (C) 2013 Maciej Górski
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.androidmapsextensions;

import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.PatternItem;

import java.util.List;

public class CircleOptions {

public final com.google.android.gms.maps.model.CircleOptions real = new com.google.android.gms.maps.model.CircleOptions();
private Object data;

public CircleOptions center(LatLng center) {
real.center(center);
return this;
}

public CircleOptions clickable(boolean clickable) {
real.clickable(clickable);
return this;
}

public CircleOptions data(Object data) {
this.data = data;
return this;
}

public CircleOptions fillColor(int color) {
real.fillColor(color);
return this;
}

public LatLng getCenter() {
return real.getCenter();
}

public Object getData() {
return data;
}

public int getFillColor() {
return real.getFillColor();
}

public double getRadius() {
return real.getRadius();
}

public int getStrokeColor() {
return real.getStrokeColor();
}

public List<PatternItem> getStrokePattern() {
return real.getStrokePattern();
}

public float getStrokeWidth() {
return real.getStrokeWidth();
}

public float getZIndex() {
return real.getZIndex();
}

public boolean isClickable() {
return real.isClickable();
}

public boolean isVisible() {
return real.isVisible();
}

public CircleOptions radius(double radius) {
real.radius(radius);
return this;
}

public CircleOptions strokeColor(int color) {
real.strokeColor(color);
return this;
}

public CircleOptions strokePattern(List<PatternItem> pattern) {
real.strokePattern(pattern);
return this;
}

public CircleOptions strokeWidth(float width) {
real.strokeWidth(width);
return this;
}

public CircleOptions visible(boolean visible) {
real.visible(visible);
return this;
}

public CircleOptions zIndex(float zIndex) {
real.zIndex(zIndex);
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2013 Maciej Górski
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.androidmapsextensions;

public final class ClusterGroup {

public static final int NOT_CLUSTERED = -1;
public static final int DEFAULT = 0;
public static final int FIRST_USER = 1;

private ClusterGroup() {
}
}

0 comments on commit 32b72d3

Please sign in to comment.