Skip to content

Commit

Permalink
Merge branch 'staceybellerose-staceylocal'
Browse files Browse the repository at this point in the history
  • Loading branch information
hissingpanda committed Mar 14, 2017
2 parents 606dd22 + 0e09464 commit c75e513
Show file tree
Hide file tree
Showing 124 changed files with 979 additions and 1,139 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Android app for [Refuge Restrooms](http://www.refugerestrooms.org/)
## Getting started
You can use Android Studio (http://developer.android.com/tools/studio/index.html) to build this project, and it should behave like any other android studio project.

Clone the repo here and then in Android Studio go to File -> New -> Import Project and navigate to your clone.
Clone the repo here and then in Android Studio go to File -> New -> Import Project and navigate to your clone. You may be prompted by Android Studio to install a few sdk dependencies.

## Contributing
By all means contribute :) Areas which definitely need work are listed as TODOs below. Feel free to add more.
Expand Down Expand Up @@ -45,6 +45,7 @@ If you push code, please make sure it builds correctly. Feel free to use pull re
- [ ] Have filter options for only returning accessible, unisex restrooms
- [ ] Get and set nearby location when gps is disabled (currently defaults to Minneapolis)
- [ ] Populate map with nearby pins like when gps is enabled
- [ ] Implement 'Search Here' button when scrolling to a different location on map like in google maps
- [ ] Add list view to Drawer menu like in the original app w\ BathroomSpecsViewUpdater, DetailViewActivity (files in older commits)
- [x] Detailed info window
- [ ] Allow users to rate and report bathrooms
Expand All @@ -56,26 +57,20 @@ If you push code, please make sure it builds correctly. Feel free to use pull re
- [ ] Select number of bathrooms to show 1-99 (separate settings for search, gps)
- [ ] Style
- [x] Style Feedback Form better
- [ ] Navigation drawer icons
- [x] Navigation drawer icons
- [ ] Style text directions section (directions.html)
- [ ] Better add bathroom section, currently just a webview
- [x] Style webview in the meantime
- [ ] Start webview on app startup, then just switch content views (currently reloads everytime)
- [ ] Use current location option
- [ ] Contact form without email client
- [ ] Update text directions while on tab
- [ ] Actionbar activity depreciated
- [x] Actionbar activity depreciated
- [ ] Add bathroom styling when no cellular data?
- [ ] Add different locales in strings.xml file
- [ ] Optimize for responsive layouts: tablet, landscape on mobile
- [ ] Remove unnecessary permissions (accounts, contacts)

## Bugs
- [ ] Screen rotation re-updates map to initial closest location (it re-initiates the map activity)
- [ ] Map reinstantiates every time a search occurs
- [ ] Turning location off after it's been on doesn't grab last known location on app reopen
- [ ] Can select location button underneath detailed window view (hard to do, but moves map while fragment is displayed over)

## Screenshots
![](/app/src/main/res/drawable-hdpi/Screenshots/screen1.png?raw=true)
![](/app/src/main/res/drawable-hdpi/Screenshots/screen2.png?raw=true)
Expand Down
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ android {
applicationId "org.refugerestrooms"
minSdkVersion 14
targetSdkVersion 23
versionCode 12
versionName "1.3.3"
versionCode 13
versionName "1.4"
}
buildTypes {
release {
Expand All @@ -33,6 +33,7 @@ android {
}
debug {
signingConfig signingConfigs.debug
applicationIdSuffix ".debug"
}
}
dexOptions {
Expand All @@ -42,11 +43,11 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.github.jd-alexander:library:1.0.1'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:design:23.3.0'
compile 'de.greenrobot:greendao:2.1.0'
compile project(':volley')
}
4 changes: 4 additions & 0 deletions app/src/debug/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="map_api_key">AIzaSyBY9MBco8afGsYftdkV5xduCyaBsft-mkQ</string>
</resources>
37 changes: 19 additions & 18 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.refugerestrooms" >
package="org.refugerestrooms">

<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
android:required="true" />

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
android:name=".application.RefugeRestroomApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/AppTheme.NoActionBar">

<meta-data android:name="com.google.android.gms.version"
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAXq1BNeI-JLcxZc_eiMUF_SRVL-Qrw88U"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/map_api_key" />

<activity
android:name=".views.TextDirectionsActivity"
android:theme="@style/AppTheme"
android:parentActivityName=".views.MainActivity"
/>
android:label="@string/title_directions"
android:parentActivityName=".views.MainActivity" />
<activity
android:name=".views.MainActivity"
android:label="@string/app_name"
android:configChanges="orientation|screenSize" >
android:configChanges="orientation|screenSize"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data
android:resource="@xml/searchable"
android:name="android.app.searchable"
android:resource="@xml/searchable"
android:value=".views.MainActivity" />
</activity>
</application>
Expand Down
33 changes: 0 additions & 33 deletions app/src/main/assets/WebView.js

This file was deleted.

57 changes: 55 additions & 2 deletions app/src/main/java/org/refugerestrooms/models/Bathroom.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package org.refugerestrooms.models;

import android.text.TextUtils;
import android.util.Log;

import com.google.android.gms.maps.model.LatLng;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;

import java.io.UnsupportedEncodingException;
import java.util.Calendar;
import java.util.Date;

/**
Expand Down Expand Up @@ -256,4 +254,59 @@ private static String decodeString(String string) {
return string;
}

public String getNameFormatted() {
String name = "";
if (!TextUtils.isEmpty(mName)) {
name += mName;
}
return name;
}

public String getAddressFormatted() {
String address = "";
if (!TextUtils.isEmpty(mStreet)) {
address += mStreet + "\n";
}
if (!TextUtils.isEmpty(mCity)) {
address += mCity + ", ";
}
if (!TextUtils.isEmpty(mState)) {
address += mState + ", ";
}
if (!TextUtils.isEmpty(mCountry)) {
address += mCountry;
}
return getStringInBytes(address);
}

public String getCommentsFormatted() {
String text = "";
String directions = getDirections();
String comments = getComments();

text += "<br><b>Directions</b><br><br>";
if (!TextUtils.isEmpty(directions)) {
text += directions + "<br><br>";
} else {
text += "No directions at this time.<br><br>";
}
text += "<br><b>Comments</b><br><br>";
if (!TextUtils.isEmpty(comments)) {
text += comments;
} else {
text += "No comments at this time.<br><br>";
}
text = getStringInBytes(text);
return text;
}

private static String getStringInBytes(String string) {
try {
string = new String(string.getBytes("UTF-8"), "UTF-8");
} catch (UnsupportedEncodingException e) {
//e.printStackTrace();
}
return string;
}

}

This file was deleted.

Loading

0 comments on commit c75e513

Please sign in to comment.