Commit 846bc406 authored by Thomas Zell's avatar Thomas Zell

Prepare for f-droid publishing

parent 85b06efb
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
......
......@@ -74,13 +74,13 @@ If you feel like it…
Bitcoin wallet: 1EUrRpjDAGgpS8J46tmsVWKbgNqAv7rWC7
## Screenshots
![image](Screenshots/list1.png)
![image](Screenshots/list2.png)
![image](Screenshots/chart1.png)
![image](Screenshots/chart2.png)
![image](Screenshots/Settings.png)
![image](Screenshots/About.png)
![image](Screenshots/PDFReport.png)
![image](fastlane/metadata/android/en-US/images/phoneScreenshots/list1.png)
![image](fastlane/metadata/android/en-US/images/phoneScreenshots/list2.png)
![image](fastlane/metadata/android/en-US/images/phoneScreenshots/chart1.png)
![image](fastlane/metadata/android/en-US/images/phoneScreenshots/chart2.png)
![image](fastlane/metadata/android/en-US/images/phoneScreenshots/Settings.png)
![image](fastlane/metadata/android/en-US/images/phoneScreenshots/About.png)
![image](fastlane/metadata/android/en-US/images/phoneScreenshots/PDFReport.png)
## Changelog
[Change log](ChangeLog.md)
......
#Sun Jul 05 13:01:49 CEST 2020
BUILD_NO=5284
#Sun Jul 05 21:32:04 CEST 2020
BUILD_NO=5287
......@@ -14,26 +14,26 @@ class BiometricHelper internal constructor(var context: Context) {
when (biometricManager.canAuthenticate()) {
BiometricManager.BIOMETRIC_SUCCESS -> {
Log.d(context.getString(R.string.app_name), "App can authenticate using biometrics.")
ret = 0
return 0
}
BIOMETRIC_ERROR_NO_HARDWARE -> {
Log.e(context.getString(R.string.app_name), context.getString(R.string.noBiometricHardware))
if (notify) {
Toast.makeText(context, context.getString(R.string.noBiometricHardware), Toast.LENGTH_LONG).show()
}
ret = -1
return -1
}
BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE -> {
Log.e(context.getString(R.string.app_name), context.getString(R.string.biometricHardwareUnavailable))
run { Toast.makeText(context, context.getString(R.string.biometricHardwareUnavailable), Toast.LENGTH_LONG).show() }
ret = -2
return -2
}
BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED -> {
Log.e(context.getString(R.string.app_name), context.getString(R.string.noCredentials))
if (notify) {
Toast.makeText(context, context.getString(R.string.noCredentials), Toast.LENGTH_LONG).show()
}
ret = -3
return -3
}
}
return ret
......
......@@ -111,11 +111,6 @@ class MainActivity : AppCompatActivity() {
mediLog = applicationContext as MediLog
/* val db = "MediLogDatabase"
val ret = deleteDatabase(db)
Log.d("MainActivity onCreate","Bundle exist. Authenticated set to " + ret)
*/
diaryViewModel = ViewModelProvider(this).get(DiaryViewModel::class.java)
diaryViewModel.init()
......@@ -218,11 +213,11 @@ class MainActivity : AppCompatActivity() {
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {
super.onAuthenticationSucceeded(result)
mediLog.setAuthenticated(true)
runOnUiThread { viewPager!!.visibility = View.VISIBLE }
runOnUiThread { viewPager?.visibility = View.VISIBLE }
}
})
runOnUiThread { viewPager!!.visibility = View.INVISIBLE }
runOnUiThread { viewPager?.visibility = View.INVISIBLE }
val promptInfo = PromptInfo.Builder()
.setTitle(getString(R.string.app_name))
.setSubtitle(getString(R.string.biometricLogin)) // .setDescription(getString(R.string.biometricLogin)
......@@ -258,7 +253,7 @@ class MainActivity : AppCompatActivity() {
// Menue
override fun onOptionsItemSelected(item: MenuItem): Boolean {
val id = item.itemId
val activeTab = tabLayout!!.selectedTabPosition
val activeTab = tabLayout?.selectedTabPosition
when (id) {
R.id.action_settings -> {
val intent = Intent(this, SettingsActivity::class.java)
......@@ -562,7 +557,7 @@ class MainActivity : AppCompatActivity() {
val WEIGHT = 1
val BLOODPRESSURE = 2
val DIARY = 3
val line = reader!!.readLine()
val line = reader?.readLine()
if (line == null) {
Toast.makeText(this, this.getString(R.string.eNoMediLogFile) + " " + line, Toast.LENGTH_SHORT).show()
return
......@@ -592,7 +587,7 @@ class MainActivity : AppCompatActivity() {
.setPositiveButton(this.getString(R.string.yes)) { _, _ ->
weightViewModel.importFile(reader, true)
if (weightFragment != null) {
weightFragment!!.notifyDataSetChanged()
weightFragment?.notifyDataSetChanged()
}
}
val alertDialog = alertDialogBuilder.create()
......@@ -600,7 +595,7 @@ class MainActivity : AppCompatActivity() {
} else {
weightViewModel.importFile(reader, true)
if (weightFragment != null) {
weightFragment!!.notifyDataSetChanged()
weightFragment?.notifyDataSetChanged()
}
}
}
......@@ -615,7 +610,7 @@ class MainActivity : AppCompatActivity() {
.setPositiveButton(this.getString(R.string.yes)) { _: DialogInterface?, _: Int ->
bloodPressureViewModel.importFile(reader, true)
if (bloodPressureFragment != null) {
bloodPressureFragment!!.notifyDataSetChanged()
bloodPressureFragment?.notifyDataSetChanged()
}
}
val alertDialog = alertDialogBuilder.create()
......@@ -623,7 +618,7 @@ class MainActivity : AppCompatActivity() {
} else {
bloodPressureViewModel.importFile(reader, true)
if (bloodPressureFragment != null) {
bloodPressureFragment!!.notifyDataSetChanged()
bloodPressureFragment?.notifyDataSetChanged()
}
}
}
......@@ -638,7 +633,7 @@ class MainActivity : AppCompatActivity() {
.setPositiveButton(this.getString(R.string.yes)) { _, _ ->
diaryViewModel.importFile(reader, true)
if (diaryFragment != null) {
diaryFragment!!.notifyDataSetChanged()
diaryFragment?.notifyDataSetChanged()
}
}
val alertDialog = alertDialogBuilder.create()
......@@ -646,7 +641,7 @@ class MainActivity : AppCompatActivity() {
} else {
diaryViewModel.importFile(reader, true)
if (diaryFragment != null) {
diaryFragment!!.notifyDataSetChanged()
diaryFragment?.notifyDataSetChanged()
}
}
}
......
......@@ -59,13 +59,13 @@ class WeightListAdapter internal constructor(context: Context) : RecyclerView.Ad
val s = f.toString() + weightUnit
if (highlightValues) {
if (f >= weightThreshold) {
Log.d("WeightListAdapter: ", "Color weightThreshold " + weightThreshold + " f: " + f)
// Log.d("WeightListAdapter: ", "Color weightThreshold " + weightThreshold + " f: " + f)
holder.weightItem.setTextColor(Color.rgb(255, 0, 0))
holder.weightItem.text = s
} else {
holder.weightItem.setTextColor(orgColor)
holder.weightItem.text = s
Log.d("WeightListAdapter: ", "noColor weightThreshold " + weightThreshold + " f: " + f)
// Log.d("WeightListAdapter: ", "noColor weightThreshold " + weightThreshold + " f: " + f)
}
}
holder.commentItem.text = current.comment
......
App Internal - Significant refactoring
- Switched to Google recommended architecture
- Utilizing Room, Data Migrations, Repositories, ViewModels and LiveData
- Migrated from Java to Kotlin
- Switched from fingerprint to Biometric libraries
- Upgraded to AndroidX
New/improved
- Protect app with biometric (fingerprint) logon
- Cleaner PDF reports, no more hard to see colours but bold and underline for elevated values
- New default color theme blue, added ability to switch colour themes
- Added MovingAverage Trendlines
- Added proper edit dialogs / fragments
- Switch chart grid on/off
- Show weight and blood pressure thresholds in chart
Fixes
- Fixed bug when highlighting elevated values, #2
- Fixed bug where deleted values remained in chart, #49
- Fixed a bug in BloodPressure PDF report. Diastolic value didn't show
Privacy respecting tracking of blood pressure and weight values, including simple charts and ways to securely share the sensitive data with medial staff if and when required.
* Support for biometric (fingerprint) logon
* Charts for weight and blood pressure values
* CSV Data export via protected/encrypted zip files
* Ability to share health data via properly formated PDF files inside protected/encrypted zip files
Manage blood pressure and weight data
......@@ -4,3 +4,4 @@ distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionSha256Sum=abc10bcedb58806e8654210f96031db541bcd2d6fc3161e81cb0572d6a15e821
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment