Skip to content

Commit 9591d8e

Browse files
committed
Initial commit++
1 parent 24250db commit 9591d8e

File tree

332 files changed

+18823
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

332 files changed

+18823
-1
lines changed

Diff for: .gitignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
5+
# Files for the Dalvik VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# Generated files
12+
bin/
13+
gen/
14+
15+
# Gradle files
16+
.gradle/
17+
build/
18+
/*/build/
19+
20+
# Local configuration file (sdk path, etc)
21+
local.properties
22+
23+
# Proguard folder generated by Eclipse
24+
proguard/
25+
26+
# Log Files
27+
*.log
28+
29+
app/crashlytics.properties
30+
/.idea/*
31+
/captures
32+
.DS_Store
33+
/tmp/
34+
*.gz
35+
com_crashlytics_export_strings.xml
36+
*.iml
37+
38+
app/*.properties

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright {yyyy} {name of copyright owner}
189+
Copyright 2016 Open mHealth
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

Diff for: README.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Introduction
2+
3+
MoleMapper Android is an open source port of the [Mole Mapper](https://github.com/Sage-Bionetworks/MoleMapper) ResearchKit(TM) melanoma research study to ResearchStack.
4+
5+
This implementation of MoleMapper on Android was created to serve as an open source example of best practices for creating a production-ready ResearchStack application. Initial funding was generous provided by a grant from the Robert Wood Johnson Foundation.
6+
7+
Oregon Health & Science University will be posting their public fork of Mole Mapper for Android in the near future, which will more closely follow the Mole Mapper Android app (being released soon by OHSU on Google Play). We will prove links to that project and the app on Google Play as they become available.
8+
9+
# About MoleMapper
10+
11+
MoleMapper is a personalized tool to help you map, measure, and monitor the moles on your skin. Using a familiar Maps-like interface, you can measure the size of a mole using the camera and a common reference object like a coin.
12+
13+
If you are 18 or older, MoleMapper also gives you the option to participate in a research study developed in partnership with researchers at Oregon Health & Science University and Sage Bionetworks, a 501 (c)(3) nonprofit research organization to better understand skin biology and melanoma risks.
14+
15+
The MoleMapper research study was created in partnership with researchers at Oregon Health & Science University and Sage Bionetworks. Unless otherwise noted, it should be assumed that all images, logos, and trademarks are copyrighted and should be used only with permission of the original copyright owners.
16+
17+
### 3<sup>rd</sup>-party library disclosures
18+
19+
<b>
20+
com.android.support:appcompat-v7<br />
21+
com.android.support:cardview-v7<br />
22+
com.android.support:design
23+
</b>
24+
25+
- Used for theming and styling views within the app. Libraries also provide backward-compatible versions of Android framework APIs (e.g. vector icon support)
26+
27+
<b>com.android.support:support-v13:23.2.0</b>
28+
29+
- Support is a set of code libraries that provide backward-compatible versions of Android framework APIs. We use support for FragmentCompat and its use in receiving the results for permission requests.
30+
31+
<b>com.android.support:multidex</b>
32+
33+
- The Android MultiDex support library enables us to go past the default 65K method limit for an android project.
34+
35+
<b>com.davemorrissey.labs:subsampling-scale-image-view</b>
36+
37+
- Used within the MoleMeasurementActivity, allows user to zoom and pan an image with subsampling for low impact on memory
38+
39+
<b>co.touchlab.squeaky:squeaky-processor:0.4.0.0</b>
40+
41+
- Annotation processor for the Squeaky ORMLite database library. The library creates auto-generated code at compile time for our database pojos (see Mole or Measurement classes)
42+
43+
<b>
44+
pl.charmas.android:android-reactive-location<br />
45+
com.google.android.gms:play-services-location<br />
46+
</b>
47+
- play-services-location allows the app to get the user's location while being conscious of battery life. Android-reactive-location library wraps the location services API’s in Rx Observables.
48+
49+
<b>com.crashlytics.sdk.android:crashlytics</b>
50+
51+
- Crash / Logging library being used during the QA period. This library will be removed at v1.0 release.

Diff for: app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

Diff for: app/build.gradle

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'me.tatarka.retrolambda'
3+
apply plugin: 'com.neenbedankt.android-apt'
4+
apply plugin: 'io.fabric'
5+
6+
android {
7+
compileSdkVersion 23
8+
buildToolsVersion "23.0.2"
9+
10+
defaultConfig {
11+
applicationId "org.researchstack.molemapper"
12+
minSdkVersion 16
13+
targetSdkVersion 23
14+
versionCode 9
15+
versionName "0.9.4"
16+
multiDexEnabled true
17+
18+
// Enables use of vector drawable for projects using Gradle 2.0.+. Please see
19+
// http://android-developers.blogspot.com/2016/02/android-support-library-232.html if you
20+
// are running Gradle 1.5 for other necessary steps
21+
vectorDrawables.useSupportLibrary = true
22+
}
23+
24+
buildTypes {
25+
release {
26+
minifyEnabled false
27+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
28+
buildConfigField 'String', 'STUDY_BASE_URL', "\"https://webservices.sagebridge.org/\""
29+
30+
// Define STUDY_ID, STUDY_NAME, STUDY_PEM can be defined here or in your local.properties
31+
// file. These variables are needed for upload to properly work.
32+
// RELEASE_STUDY_ID is of type String (e.g. "id-mole-mapper-study")
33+
// RELEASE_STUDY_NAME is of type String (e.g. "MoleMapper Study")
34+
// RELEASE_STUDY_PEM_FILE_NAME is of type String, (e.g. "molemapper"). The pem file should
35+
// be located at the root directory of your assets folder.
36+
buildConfigField 'String', 'STUDY_ID', RELEASE_STUDY_ID
37+
buildConfigField 'String', 'STUDY_NAME', RELEASE_STUDY_NAME
38+
buildConfigField 'String', 'STUDY_PEM', RELEASE_STUDY_PEM_FILE_NAME
39+
}
40+
41+
debug {
42+
debuggable true
43+
minifyEnabled false
44+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
45+
buildConfigField 'String', 'STUDY_BASE_URL', "\"https://webservices.sagebridge.org/\""
46+
47+
// Define STUDY_ID, STUDY_NAME, STUDY_PEM can be defined here or in your local.properties
48+
// file. These variables are needed for upload to properly work.
49+
// RELEASE_STUDY_ID is of type String (e.g. "id-mole-mapper-study")
50+
// RELEASE_STUDY_NAME is of type String (e.g. "MoleMapper Study")
51+
// RELEASE_STUDY_PEM_FILE_NAME is of type String, (e.g. "molemapper"). The pem file should
52+
// be located at the root directory of your assets folder.
53+
buildConfigField 'String', 'STUDY_ID', DEBUG_STUDY_ID
54+
buildConfigField 'String', 'STUDY_NAME', DEBUG_STUDY_NAME
55+
buildConfigField 'String', 'STUDY_PEM', DEBUG_STUDY_PEM_FILE_NAME
56+
}
57+
}
58+
59+
compileOptions {
60+
sourceCompatibility JavaVersion.VERSION_1_8
61+
targetCompatibility JavaVersion.VERSION_1_8
62+
}
63+
64+
packagingOptions {
65+
exclude 'META-INF/LICENSE.txt'
66+
exclude 'META-INF/NOTICE.txt'
67+
}
68+
69+
dexOptions {
70+
javaMaxHeapSize "4g" //specify the heap size for the dex process
71+
}
72+
}
73+
74+
dependencies {
75+
compile fileTree(dir: 'libs', include: ['*.jar'])
76+
testCompile 'junit:junit:4.12'
77+
compile 'com.android.support:appcompat-v7:23.2.1'
78+
compile 'com.android.support:cardview-v7:23.2.1'
79+
compile 'com.android.support:support-v13:23.2.1'
80+
compile 'com.android.support:design:23.2.1'
81+
compile 'com.android.support:multidex:1.0.1'
82+
compile 'org.researchstack:skin:1.0.0.rc1-tl'
83+
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.4.1'
84+
apt 'co.touchlab.squeaky:squeaky-processor:0.4.0.0'
85+
compile 'com.madgag.spongycastle:core:1.54.0.0'
86+
compile 'com.madgag.spongycastle:prov:1.54.0.0'
87+
compile 'com.madgag.spongycastle:pkix:1.54.0.0'
88+
compile 'pl.charmas.android:android-reactive-location:0.8@aar'
89+
compile 'com.google.android.gms:play-services-location:8.4.0'
90+
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
91+
transitive = true;
92+
}
93+
}

Diff for: app/lint.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<lint>
2+
<issue id="InvalidPackage">
3+
<ignore regexp="okio-1.6.0.jar"/>
4+
<ignore regexp="retrofit-2.0.0-beta3.jar"/>
5+
<ignore regexp="pkix-1.54.0.0.jar"/>
6+
</issue>
7+
</lint>

Diff for: app/proguard-rules.pro

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/wdziemia/Library/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+
#}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.researchstack.molemapper;
2+
3+
import android.app.Application;
4+
import android.test.ApplicationTestCase;
5+
6+
/**
7+
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8+
*/
9+
public class ApplicationTest extends ApplicationTestCase<Application>
10+
{
11+
public ApplicationTest()
12+
{
13+
super(Application.class);
14+
}
15+
}

Diff for: app/src/main/AndroidManifest.xml

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<manifest
2+
package="org.researchstack.molemapper"
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
>
5+
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
<uses-permission android:name="android.permission.CAMERA"/>
8+
<uses-feature android:name="android.hardware.camera"/>
9+
<uses-feature android:name="android.hardware.camera.autofocus"/>
10+
11+
<application
12+
android:name="org.researchstack.molemapper.MoleMapperApplication"
13+
android:allowBackup="true"
14+
android:icon="@mipmap/ic_launcher"
15+
android:label="@string/app_name"
16+
android:supportsRtl="true"
17+
android:theme="@style/Theme.MoleMapper"
18+
>
19+
20+
<activity
21+
android:name="org.researchstack.skin.ui.SplashActivity"
22+
android:theme="@style/Theme.MoleMapper.Splash"
23+
android:windowSoftInputMode="adjustNothing"
24+
>
25+
<intent-filter>
26+
<action android:name="android.intent.action.MAIN"/>
27+
<category android:name="android.intent.category.LAUNCHER"/>
28+
</intent-filter>
29+
</activity>
30+
31+
<activity
32+
android:name="org.researchstack.skin.ui.MainActivity"
33+
android:label="@string/app_name"
34+
android:screenOrientation="portrait"
35+
android:theme="@style/Theme.MoleMapper.Main"
36+
/>
37+
38+
<activity
39+
android:name="org.researchstack.molemapper.PhotoCaptureActivity"
40+
android:screenOrientation="portrait"
41+
android:theme="@style/Theme.MoleMapper.TransparentStatusBar"
42+
/>
43+
44+
<activity
45+
android:name="org.researchstack.molemapper.BodyMapActivity"
46+
/>
47+
48+
<activity
49+
android:name="org.researchstack.molemapper.BodyZoneActivity"
50+
/>
51+
52+
<activity
53+
android:name="org.researchstack.molemapper.MoleHistoryActivity"
54+
android:theme="@style/Theme.MoleMapper.TransparentStatusBar"
55+
/>
56+
57+
<activity
58+
android:name="org.researchstack.molemapper.MoleMeasurementActivity"
59+
android:theme="@style/Theme.MoleMapper.TransparentStatusBar"
60+
/>
61+
62+
<activity
63+
android:name="org.researchstack.skin.ui.OnboardingActivity"
64+
android:label="@string/app_name"
65+
android:theme="@style/Theme.MoleMapper.Onboarding"
66+
/>
67+
68+
<activity
69+
android:name="org.researchstack.backbone.ui.ViewTaskActivity"
70+
android:label="@string/app_name"
71+
android:windowSoftInputMode="adjustResize"
72+
android:theme="@style/Theme.MoleMapper.Survey"
73+
/>
74+
75+
<activity
76+
android:name="org.researchstack.skin.ui.ConsentTaskActivity"
77+
android:label="@string/app_name"
78+
android:windowSoftInputMode="adjustResize"
79+
android:theme="@style/Theme.MoleMapper.Survey"
80+
/>
81+
82+
<activity
83+
android:name="org.researchstack.skin.ui.SignUpTaskActivity"
84+
android:label="@string/app_name"
85+
android:theme="@style/Theme.MoleMapper.Survey"
86+
/>
87+
88+
<activity
89+
android:name="org.researchstack.skin.ui.EmailVerificationActivity"
90+
android:label="@string/rss_confirm"
91+
android:theme="@style/Theme.MoleMapper.Survey"
92+
/>
93+
94+
<activity
95+
android:name="org.researchstack.backbone.ui.ViewWebDocumentActivity"
96+
android:label="@string/app_name"
97+
android:theme="@style/Theme.MoleMapper.Survey"
98+
/>
99+
100+
<activity
101+
android:name="org.researchstack.backbone.ui.ViewVideoActivity"
102+
android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|uiMode"
103+
android:label="@string/app_name"
104+
android:theme="@style/Theme.MoleMapper.Video"
105+
/>
106+
107+
<activity
108+
android:name="org.researchstack.molemapper.MoleMapperSettingsActivity"
109+
android:label="@string/rss_settings"
110+
android:theme="@style/Theme.MoleMapper.Settings"/>
111+
112+
<activity
113+
android:name="org.researchstack.molemapper.ui.MoleLearnActivity"
114+
android:label="@string/learn_more"
115+
android:theme="@style/Theme.MoleMapper.Settings"
116+
/>
117+
118+
<receiver
119+
android:name="org.researchstack.skin.notification.TaskNotificationReceiver"
120+
android:enabled="true"
121+
/>
122+
123+
<receiver
124+
android:name="org.researchstack.skin.notification.DeviceBootReceiver"
125+
android:enabled="true"
126+
android:exported="false"
127+
>
128+
<intent-filter>
129+
<action android:name="android.intent.action.BOOT_COMPLETED"/>
130+
</intent-filter>
131+
</receiver>
132+
133+
<receiver
134+
android:name="org.researchstack.skin.notification.TaskAlertReceiver"
135+
android:enabled="true"
136+
android:exported="false"
137+
>
138+
<intent-filter>
139+
<action android:name="org.researchstack.skin.notification.ALERT_CREATE"/>
140+
<action android:name="org.researchstack.skin.notification.ALERT_CREATE_ALL"/>
141+
<action android:name="org.researchstack.skin.notification.ALERT_DELETE"/>
142+
<action android:name="org.researchstack.skin.notification.ALERT_DELETE_ALL"/>
143+
</intent-filter>
144+
</receiver>
145+
146+
<meta-data
147+
android:name="io.fabric.ApiKey"
148+
android:value="XXXXXXXXXXXXXX"/>
149+
</application>
150+
151+
</manifest>

0 commit comments

Comments
 (0)