Skip to content

Commit 733c68a

Browse files
committed
initial commit
0 parents  commit 733c68a

File tree

81 files changed

+6803
-0
lines changed

Some content is hidden

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

81 files changed

+6803
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# eldercare.android

app/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/build
2+
*.apk

app/build.gradle

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 26
5+
buildToolsVersion "26.0.2"
6+
defaultConfig {
7+
applicationId "uk.co.agnate.eldercare"
8+
minSdkVersion 15
9+
targetSdkVersion 26
10+
versionCode 9
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.android.support:design:26.+'
30+
testCompile 'junit:junit:4.12'
31+
}

app/proguard-rules.pro

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /home/dean/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+
19+
# Uncomment this to preserve the line number information for
20+
# debugging stack traces.
21+
#-keepattributes SourceFile,LineNumberTable
22+
23+
# If you keep the line number information, uncomment this to
24+
# hide the original source file name.
25+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package uk.co.agnate.eldercare;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumentation test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("uk.co.agnate.eldercare", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="uk.co.agnate.eldercare">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme"
12+
android:installLocation="auto">
13+
<activity
14+
android:name=".SplashActivity"
15+
android:noHistory="true"
16+
android:theme="@style/SplashTheme">
17+
<intent-filter>
18+
<action android:name="android.intent.action.MAIN" />
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
</activity>
22+
<activity
23+
android:name=".MainActivity"
24+
android:label="@string/app_name"
25+
android:theme="@style/SplashTheme"><!-- same as splash screen to stop screen going white for a few seconds -->
26+
<intent-filter>
27+
<action android:name="android.intent.action.VIEW" />
28+
<category android:name="android.intent.category.DEFAULT"/>
29+
</intent-filter>
30+
</activity>
31+
</application>
32+
33+
</manifest>

app/src/main/assets/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pyc

app/src/main/assets/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# eldercare
2+
3+
Built with Bootstrap 4, HTML5, Font Awesome, Python, org-mode, Orgnode, Android Studio, Apple Xcode. Where possible all original scientific works have been cited with a journal reference and all registered trademarks and copyright acknowledged.
4+
5+
This compilation of educational material and its source code is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>
6+
7+
A live web demo is available here <a href="https://agnate.co.uk/ec/">https://agnate.co.uk/ec/</a>
8+
9+
The HTML5 app is also available built into an <a href="https://play.google.com/store/apps/details?id=uk.co.agnate.eldercare">Android app</a>.
10+
11+
iOS App ... coming soon.
12+
13+
Contributors:
14+
<a href="https://about.me/deanjenkins">Dean Jenkins</a>
15+
16+
# scale and guideline build script - go-scales.py
17+
18+
go-scales.py is a build script written in Python which runs from the command line to create or update the scales and guidelines HTML and Javascript files within the App before being released to a browser or an App. It is a developer tool.
19+
20+
The Javascript scales and guidelines are designed to be standalone and not require internet access. They could be used on a mobile device for example that doesn't have network access - such as a 'bring your own device' to clinical settings or clinic-based pre-programmed tablets or small screens. The scales and guidelines are stored in js/scales and js/guidelines and the static HTML pages that call them are all built on templates to make it easier to maintain. The scales are handcrafted but the guideline javascript is built with a tool based on org-mode encoding.
21+
22+
The python script go-scales.py is a tool that builds the static HTML pages for the scales and guidelines from a list of names. It first checks that a Javascript file exists for that scale name in js/scales/ and then creates or overwrites the HTML file scale_scalename.html. It creates the Javascipt for the guidelines similarly in js/guidelines building them from the org-node encoded file in that folder of the same name. Then it offers to copy the entire HTML5 app for eldercare into the Android Studio Project's asset folder (modify this target folder in go-scales.py for your Android app folder if building eldercare into an Android App).

app/src/main/assets/about.html

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<!-- Required meta tags -->
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
8+
<!-- Bootstrap CSS -->
9+
<link rel="stylesheet" href="css/bootstrap.min.css">
10+
11+
<!-- Custom styles for this template -->
12+
<link href="css/ec.css" rel="stylesheet">
13+
</head>
14+
15+
<body>
16+
17+
<div id="nav_holder"></div>
18+
<script src="js/nav.js"></script>
19+
20+
<!-- JavaScript -->
21+
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
22+
<script src="js/jquery-3.2.1.slim.min.js"></script>
23+
<script src="js/popper.min.js"></script>
24+
<script src="js/bootstrap.min.js"></script>
25+
26+
<div class="container">
27+
<div class="home_title">
28+
<h1>About</h1>
29+
<p class="lead">About this app</p>
30+
</div>
31+
32+
<p>This app has been designed as an educational resource for medicine in the eldery with the support of the staff and students of the eldercare department at Royal Cornwall Hospital, UK.</p>
33+
<p>Built with Bootstrap 4, HTML5, Font Awesome, Orgnode, Android Studio, Apple Xcode. Where possible all original scientific works have been cited with a journal reference and all registered trademarks and copyright acknowledged.</p>
34+
<p>This compilation of educational material and its <a href="https://github.com/rdjenkins/eldercare">source code</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</p>
35+
<p>Contributors:<br>
36+
<a href="https://about.me/deanjenkins">Dr Dean Jenkins</a></p>
37+
</div><!-- /.container -->
38+
39+
</body>
40+
</html>

0 commit comments

Comments
 (0)