├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── scopes │ └── scope_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── yellowgreenbevel.png │ │ │ ├── drawable-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── xml │ │ │ │ └── file_paths.xml │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── strings.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ └── menu_gpsaplant.xml │ │ │ └── layout │ │ │ │ ├── specimenshow.xml │ │ │ │ ├── activity_color_capture.xml │ │ │ │ └── activity_gpsaplant.xml │ │ ├── java │ │ │ └── nw15s305 │ │ │ │ └── plantplaces │ │ │ │ └── com │ │ │ │ ├── dao │ │ │ │ ├── IOfflinePlantDAO.java │ │ │ │ ├── IPlantDAO.java │ │ │ │ ├── ISpecimenDAO.java │ │ │ │ ├── PlantDAOStub.java │ │ │ │ ├── NetworkDAO.java │ │ │ │ ├── SpecimenDAOStub.java │ │ │ │ ├── PlantDAO.java │ │ │ │ ├── PlantPlacesDAO.java │ │ │ │ ├── OfflineSpecimenDAO.java │ │ │ │ └── OfflinePlantDAO.java │ │ │ │ ├── plantplaces15s305 │ │ │ │ ├── SpecimenShowActivity.java │ │ │ │ ├── PlantPlacesActivity.java │ │ │ │ ├── SynchronizeBroadcastReceiver.java │ │ │ │ ├── SpecimenShowFragment.java │ │ │ │ ├── ColorCaptureActivity.java │ │ │ │ └── GPSAPlant.java │ │ │ │ └── dto │ │ │ │ ├── PlantDTO.java │ │ │ │ └── SpecimenDTO.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── nw15s305 │ │ └── plantplaces │ │ └── com │ │ ├── plantplaces15s305 │ │ └── ApplicationTest.java │ │ └── test │ │ └── SpecimenDAOTest.java ├── proguard-rules.pro ├── build.gradle ├── google-services.json └── app.iml ├── settings.gradle ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── PlantPlaces15s305.iml ├── gradlew.bat └── gradlew /.idea/.name: -------------------------------------------------------------------------------- 1 | PlantPlaces15s305 -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discospiff/PlantPlaces15s305/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discospiff/PlantPlaces15s305/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discospiff/PlantPlaces15s305/HEAD/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discospiff/PlantPlaces15s305/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discospiff/PlantPlaces15s305/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/yellowgreenbevel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discospiff/PlantPlaces15s305/HEAD/app/src/main/res/drawable-hdpi/yellowgreenbevel.png -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/nw15s305/plantplaces/com/dao/IOfflinePlantDAO.java: -------------------------------------------------------------------------------- 1 | package nw15s305.plantplaces.com.dao; 2 | 3 | import java.util.Set; 4 | 5 | import nw15s305.plantplaces.com.dto.PlantDTO; 6 | 7 | /** 8 | * Created by jonesb on 4/29/2015. 9 | */ 10 | public interface IOfflinePlantDAO extends IPlantDAO { 11 | void insert(PlantDTO plant); 12 | 13 | int countPlants(); 14 | 15 | Set fetchAllGuids(); 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/nw15s305/plantplaces/com/dao/IPlantDAO.java: -------------------------------------------------------------------------------- 1 | package nw15s305.plantplaces.com.dao; 2 | 3 | import org.json.JSONException; 4 | 5 | import java.io.IOException; 6 | import java.util.List; 7 | 8 | import nw15s305.plantplaces.com.dto.PlantDTO; 9 | 10 | /** 11 | * Created by jonesb on 4/24/2015. 12 | */ 13 | public interface IPlantDAO { 14 | List fetchPlants(String searchTerm) throws IOException, JSONException; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/nw15s305/plantplaces/com/plantplaces15s305/SpecimenShowActivity.java: -------------------------------------------------------------------------------- 1 | package nw15s305.plantplaces.com.plantplaces15s305; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.os.PersistableBundle; 6 | 7 | /** 8 | * Created by jonesb on 5/22/2015. 9 | */ 10 | public class SpecimenShowActivity extends Activity { 11 | 12 | @Override 13 | public void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | setContentView(R.layout.specimenshow); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/nw15s305/plantplaces/com/plantplaces15s305/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package nw15s305.plantplaces.com.plantplaces15s305; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | 7 | 8 | /** 9 | * Testing Fundamentals 10 | */ 11 | public class ApplicationTest extends ApplicationTestCase { 12 | public ApplicationTest() { 13 | super(Application.class); 14 | } 15 | 16 | public void testFoo() { 17 | assertEquals(1, 1); 18 | } 19 | 20 | public void testBar() { 21 | assertEquals(1, 5); 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_gpsaplant.xml: -------------------------------------------------------------------------------- 1 | 4 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Programs\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 1.7 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /PlantPlaces15s305.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/nw15s305/plantplaces/com/dao/ISpecimenDAO.java: -------------------------------------------------------------------------------- 1 | package nw15s305.plantplaces.com.dao; 2 | 3 | import java.util.List; 4 | 5 | import nw15s305.plantplaces.com.dto.PlantDTO; 6 | import nw15s305.plantplaces.com.dto.SpecimenDTO; 7 | 8 | /** 9 | * Created by jonesb on 5/16/2015. 10 | */ 11 | public interface ISpecimenDAO { 12 | 13 | /** 14 | * Save the SpecimenDTO to the persistence layer. 15 | */ 16 | public void save(SpecimenDTO specimen) throws Exception; 17 | 18 | /** 19 | * Return all plants with specimens that match the search term. 20 | * @param searchTerm 21 | * @return 22 | */ 23 | public List search(String searchTerm); 24 | 25 | /** 26 | * Return all specimens near a certain point. 27 | * @param latitude 28 | * @param longitude 29 | * @param range 30 | * @return 31 | */ 32 | public List search (double latitude, double longitude, double range); 33 | } 34 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 26 5 | buildToolsVersion "26.0.1" 6 | defaultConfig { 7 | applicationId "nw15s305.plantplaces.com.plantplaces15s305" 8 | minSdkVersion 25 9 | targetSdkVersion 26 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile 'com.android.support:appcompat-v7:26.+' 28 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 29 | compile 'com.google.android.gms:play-services:9.0.0' 30 | testCompile 'junit:junit:4.12' 31 | } 32 | -------------------------------------------------------------------------------- /app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "763536257652", 4 | "firebase_url": "https://plantplacesnw2015.firebaseio.com", 5 | "project_id": "plantplacesnw2015", 6 | "storage_bucket": "plantplacesnw2015.appspot.com" 7 | }, 8 | "client": [ 9 | { 10 | "client_info": { 11 | "mobilesdk_app_id": "1:763536257652:android:b09b15bb3d29e2a6", 12 | "android_client_info": { 13 | "package_name": "nw15s305.plantplaces.com.plantplaces15s305" 14 | } 15 | }, 16 | "oauth_client": [ 17 | { 18 | "client_id": "763536257652-e53pfralfjs7lgnso0b1isdnk8ofcugi.apps.googleusercontent.com", 19 | "client_type": 3 20 | } 21 | ], 22 | "api_key": [ 23 | { 24 | "current_key": "AIzaSyAGOzGEwqKZq6spoOTPXcHhcJ89dFihcmM" 25 | } 26 | ], 27 | "services": { 28 | "analytics_service": { 29 | "status": 1 30 | }, 31 | "appinvite_service": { 32 | "status": 1, 33 | "other_platform_oauth_client": [] 34 | }, 35 | "ads_service": { 36 | "status": 2 37 | } 38 | } 39 | } 40 | ], 41 | "configuration_version": "1" 42 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/specimenshow.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 17 | 18 |