Skip to content

Commit 609582b

Browse files
authored
Merge pull request #83 from dhis2/2.23-legacy
2.23 legacy
2 parents 5106166 + 094e552 commit 609582b

83 files changed

Lines changed: 6412 additions & 1062 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ build
2626

2727
#Android
2828
*.apk
29+
fabric.properties
30+
31+
# last commit file
32+
app/src/main/res/raw/lastcommit.txt

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "sdk"]
2+
path = sdk
3+
url = https://github.com/dhis2/dhis2-android-sdk
4+
branch = tracker-capture

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# dhis2-android-trackercapture
22
Android application for DHIS 2 for tracking of persons and things.
33

4-
The refactored version of Tracker Capture, utilizing our new SDK is on the roadmap to be finished by 1st May 2016
5-
64
Get the APK from the release page:
75

86
https://github.com/dhis2/dhis2-android-trackercapture/releases
@@ -14,12 +12,31 @@ If you want to try the application out with a demo database, you can use the fol
1412
- Password: Android123
1513

1614
# How to Download and Set up in Android Studio
17-
Want a step wise document on how to build this app?
18-
https://docs.google.com/document/d/141uX2IKA7NRouaYDAPUhJu29WRmiw7UxwNtXSj_iOVA/edit
15+
Stepwise explanation on how to set it up: https://docs.google.com/document/d/141uX2IKA7NRouaYDAPUhJu29WRmiw7UxwNtXSj_iOVA/edit?usp=sharing
16+
1917
To successfully build and run this project, the dhis2-android-sdk is required.
2018

2119
The dhis2-android-sdk project https://github.com/dhis2/dhis2-android-sdk folder should be in the same root folder as the dhis2-android-trackercapture.
22-
A workspace folder structure would look like this:
20+
21+
For 2.23-legacy branch: A workspace folder structure would look like this:
22+
23+
> .
24+
25+
> ..
26+
27+
> dhis2-android-sdk
28+
29+
> dhis2-android-trackercapture
30+
31+
> dhis2-android-new-sdk
32+
33+
dhis2-android-sdk project should be in branch 2.23-legacy.
34+
dhis2-android-trackercapture should be in branch 2.23-legacy.
35+
dhis2-android-new-sdk should be in branch eventcapture
36+
37+
dhis2-android-new-sdk is the same project as dhis2-android-sdk but in a different branch. This means that you need to keep two sets of this project in your workspace. Since these two projects cannot have the same folder name the sdk-project in master branch should be renamed to dhis2-android-new-sdk
38+
39+
For older branches below 2.23: A workspace folder structure would look like this:
2340

2441
> .
2542

app/build.gradle

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,46 @@
2828
*/
2929

3030
apply plugin: 'com.android.application'
31+
apply plugin: 'io.fabric'
32+
apply plugin: 'jacoco-android'
3133

3234
android {
35+
// compileSdkVersion rootProject.ext.configuration.compileSdkVersion
36+
// buildToolsVersion rootProject.ext.configuration.buildToolsVersion
37+
//
38+
// defaultConfig {
39+
// applicationId "org.hisp.dhis.android.trackercapture"
40+
// minSdkVersion 15
41+
// targetSdkVersion 21
42+
// versionCode 22
43+
// versionName "0.3.4-2.22"
44+
// }
45+
3346
compileSdkVersion rootProject.ext.compileSdkVersion
3447
buildToolsVersion rootProject.ext.buildToolsVersion
3548

3649
defaultConfig {
37-
applicationId "org.hisp.dhis.android.trackercapture"
38-
minSdkVersion 15
39-
targetSdkVersion 21
40-
versionCode 17
41-
versionName "0.2.12-2.21"
50+
minSdkVersion rootProject.ext.minSdkVersion
51+
targetSdkVersion rootProject.ext.targetSdkVersion
52+
versionCode rootProject.ext.versionCode
53+
versionName rootProject.ext.versionName
4254
}
55+
4356
buildTypes {
4457
release {
4558
minifyEnabled false
4659
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
4760
}
61+
debug {
62+
testCoverageEnabled true
63+
}
4864
}
4965

5066
lintOptions {
5167
disable 'RtlSymmetry', 'RtlHardcoded'
68+
abortOnError false
5269
}
53-
}
54-
55-
dependencies {
56-
compile fileTree(dir: 'libs', include: ['*.jar'])
57-
compile project(':..:dhis2-android-sdk:app')
58-
}
59-
6070

61-
android {
6271
packagingOptions {
6372
exclude 'META-INF/DEPENDENCIES.txt'
6473
exclude 'META-INF/LICENSE.txt'
@@ -72,3 +81,13 @@ android {
7281
exclude 'META-INF/LGPL2.1'
7382
}
7483
}
84+
85+
dependencies {
86+
compile project(':core')
87+
compile project(':ui')
88+
89+
90+
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
91+
transitive = true;
92+
}
93+
}

app/src/main/AndroidManifest.xml

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!--
1+
<?xml version="1.0" encoding="utf-8"?><!--
32
~ * Copyright (c) 2016, University of Oslo
43
~ * All rights reserved.
54
~ *
@@ -29,51 +28,54 @@
2928
-->
3029

3130
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
32-
package="org.hisp.dhis.android.trackercapture" >
31+
xmlns:tools="http://schemas.android.com/tools"
32+
package="org.hisp.dhis.android.trackercapture">
3333

34-
<uses-sdk
35-
android:targetSdkVersion="21" />
34+
<uses-sdk android:targetSdkVersion="21" />
3635

3736
<uses-permission android:name="android.permission.INTERNET" />
3837
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
3938
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
4039
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
41-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
42-
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
40+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
41+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
4342

4443
<application
4544
android:name="org.hisp.dhis.android.trackercapture.TrackerCaptureApplication"
46-
android:allowBackup="true"
45+
android:allowBackup="false"
46+
tools:replace="android:allowBackup"
4747
android:icon="@drawable/ic_launcher"
4848
android:label="@string/app_name"
49-
android:theme="@style/AppTheme">
49+
android:theme="@style/AppTheme.Base">
5050
<activity
5151
android:name="org.hisp.dhis.android.sdk.ui.activities.SplashActivity"
52-
android:theme="@style/LoginScreenTheme"
53-
android:label="@string/app_name" >
52+
android:label="@string/app_name"
53+
android:theme="@style/LoginScreenTheme">
5454
<intent-filter>
5555
<action android:name="android.intent.action.MAIN" />
5656
<category android:name="android.intent.category.LAUNCHER" />
5757
</intent-filter>
5858
</activity>
5959
<activity
6060
android:name="org.hisp.dhis.android.sdk.ui.activities.LoginActivity"
61-
android:theme="@style/LoginScreenTheme"
6261
android:configChanges="orientation|keyboardHidden|screenSize"
63-
android:label="@string/app_name" >
64-
</activity>
62+
android:label="@string/app_name"
63+
android:theme="@style/LoginScreenTheme"
64+
android:windowSoftInputMode="adjustResize"></activity>
6565
<activity
66-
android:name="org.hisp.dhis.android.trackercapture.MainActivity"
66+
android:name=".MainActivity"
6767
android:configChanges="orientation|keyboardHidden|screenSize"
6868
android:label="@string/title_activity_main"
69-
android:windowSoftInputMode="adjustPan" >
69+
android:windowSoftInputMode="adjustPan"></activity>
70+
<activity
71+
android:name=".activities.HolderActivity"
72+
android:configChanges="orientation|keyboardHidden|screenSize"
73+
android:windowSoftInputMode="adjustPan|stateHidden">
74+
7075
</activity>
7176

72-
<receiver
73-
android:name="org.hisp.dhis.android.sdk.services.PeriodicSynchronizer">
74-
</receiver>
75-
<receiver
76-
android:name="org.hisp.dhis.android.sdk.services.PeriodicSynchronizerAutoStarter">
77+
<receiver android:name="org.hisp.dhis.android.sdk.services.PeriodicSynchronizer"></receiver>
78+
<receiver android:name="org.hisp.dhis.android.sdk.services.PeriodicSynchronizerAutoStarter">
7779
<intent-filter>
7880
<action android:name="android.intent.action.BOOT_COMPLETED" />
7981
</intent-filter>
@@ -82,8 +84,31 @@
8284
<service
8385
android:name="org.hisp.dhis.android.sdk.services.StartPeriodicSynchronizerService"
8486
android:enabled="true" />
87+
<service
88+
android:name="org.hisp.dhis.android.trackercapture.export.TrackerExportService"
89+
android:enabled="true"
90+
android:exported="true">
91+
<intent-filter>
92+
<action android:name="org.hisp.dhis.android.trackercapture.export.TrackerExportService.EXPORT" />
93+
</intent-filter>
94+
</service>
8595

8696
<!-- Specify the next screen after SplashScreen if user already logged in -->
87-
<meta-data android:name="nextClassName" android:value="org.hisp.dhis.android.trackercapture.MainActivity" />
97+
<meta-data
98+
android:name="nextClassName"
99+
android:value="org.hisp.dhis.android.trackercapture.MainActivity" />
100+
<meta-data
101+
android:name="io.fabric.ApiKey"
102+
android:value="a5caa46009119f5e584e4964c30a922095b1075c" />
103+
<provider
104+
android:name="org.hisp.dhis.android.trackercapture.export.DBProvider"
105+
android:authorities="org.hisp.dhis.android.trackercapture.export.ExportData"
106+
android:exported="false"
107+
android:grantUriPermissions="true">
108+
<meta-data
109+
android:name="android.support.FILE_PROVIDER_PATHS"
110+
android:resource="@xml/file_paths" />
111+
</provider>
88112
</application>
113+
89114
</manifest>

0 commit comments

Comments
 (0)