mirror of
https://github.com/dzeiocom/OpenHealth.git
synced 2025-04-22 19:02:16 +00:00
misc: Comments and cleanup
This commit is contained in:
parent
06905eec88
commit
9604a25585
10
README.md
10
README.md
@ -26,11 +26,13 @@ No Ads, no tracking.
|
|||||||
|
|
||||||
Permissions requests are for specifics usage and are only requests the first time they are needed:
|
Permissions requests are for specifics usage and are only requests the first time they are needed:
|
||||||
|
|
||||||
| Permission | Why is it requested |
|
| Permission | Why is it requested |
|
||||||
|:----------------------:|:-----------------------------------------------------------------|
|
|:--------------------:|:-----------------------------------------------------------|
|
||||||
| ACTIVITY_RECOGNITION | Device Steps Usage |
|
| ACTIVITY_RECOGNITION | Device Steps Usage |
|
||||||
|
| INTERNET | Food fetching from OpenFoodFact |
|
||||||
|
| POST_NOTIFICATIONS | send notifications for water intake and device steps usage |
|
||||||
|
|
||||||
No other permissions are used (even the internet permission ;)).
|
No other permissions are used.
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
import java.util.Properties
|
import java.util.Properties
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
// Android Application?
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
|
|
||||||
|
// Support for kotlin in Android
|
||||||
kotlin("android")
|
kotlin("android")
|
||||||
|
|
||||||
|
// Data Injection
|
||||||
id("dagger.hilt.android.plugin")
|
id("dagger.hilt.android.plugin")
|
||||||
|
|
||||||
// Safe Navigation
|
// Safe Navigation
|
||||||
@ -15,12 +20,16 @@ plugins {
|
|||||||
kotlin("kapt")
|
kotlin("kapt")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The application ID
|
||||||
val appID = "com.dzeio.openhealth"
|
val appID = "com.dzeio.openhealth"
|
||||||
|
|
||||||
// Languages
|
// the application supported languages
|
||||||
val locales = listOf("en", "fr")
|
val locales = listOf("en", "fr")
|
||||||
|
|
||||||
|
// minimum application required SDK version to run
|
||||||
val sdkMin = 21
|
val sdkMin = 21
|
||||||
|
|
||||||
|
// target SDK version
|
||||||
val sdkTarget = 33
|
val sdkTarget = 33
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@ -122,8 +131,8 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
// Dzeio Charts
|
// Dzeio Charts
|
||||||
implementation(project(":charts"))
|
implementation(project(":charts"))
|
||||||
// implementation(project(":CrashHandler"))
|
|
||||||
|
|
||||||
|
// Dzeio Crash Handler
|
||||||
implementation("com.dzeio:crashhandler:1.0.1")
|
implementation("com.dzeio:crashhandler:1.0.1")
|
||||||
|
|
||||||
// Core dependencies
|
// Core dependencies
|
||||||
@ -135,8 +144,6 @@ dependencies {
|
|||||||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.5.1")
|
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.5.1")
|
||||||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
|
||||||
|
|
||||||
// implementation("com.github.Aviortheking:crashhandler:0.2.3")
|
|
||||||
|
|
||||||
// Coroutines
|
// Coroutines
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
|
||||||
|
|
||||||
@ -154,34 +161,21 @@ dependencies {
|
|||||||
implementation("androidx.paging:paging-runtime:3.1.1")
|
implementation("androidx.paging:paging-runtime:3.1.1")
|
||||||
implementation("androidx.paging:paging-runtime-ktx:3.1.1")
|
implementation("androidx.paging:paging-runtime-ktx:3.1.1")
|
||||||
|
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
implementation("androidx.work:work-runtime-ktx:2.7.1")
|
implementation("androidx.work:work-runtime-ktx:2.7.1")
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation("junit:junit:4.13.2")
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||||
|
|
||||||
// Graph
|
// Graph
|
||||||
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")
|
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")
|
||||||
|
|
||||||
// Graphs test 2
|
|
||||||
implementation("com.github.HackPlan:AndroidCharts:1.0.4")
|
|
||||||
|
|
||||||
// Hilt
|
// Hilt
|
||||||
implementation("com.google.dagger:hilt-android:2.44.2")
|
implementation("com.google.dagger:hilt-android:2.44.2")
|
||||||
kapt("com.google.dagger:hilt-compiler:2.44.2")
|
kapt("com.google.dagger:hilt-compiler:2.44.2")
|
||||||
|
|
||||||
// Google Fit
|
|
||||||
// implementation("com.google.android.gms:play-services-fitness:21.1.0")
|
|
||||||
// implementation("com.google.android.gms:play-services-auth:20.4.0")
|
|
||||||
// implementation("androidx.health.connect:connect-client:1.0.0-alpha08")
|
|
||||||
|
|
||||||
// Samsung Health
|
|
||||||
// implementation(files("libs/samsung-health-data-1.5.0.aar"))
|
|
||||||
// implementation("com.google.code.gson:gson:2.9.1")
|
|
||||||
|
|
||||||
// ROOM
|
// ROOM
|
||||||
implementation("androidx.room:room-runtime:2.4.3")
|
implementation("androidx.room:room-runtime:2.4.3")
|
||||||
kapt("androidx.room:room-compiler:2.4.3")
|
kapt("androidx.room:room-compiler:2.4.3")
|
||||||
@ -196,7 +190,7 @@ dependencies {
|
|||||||
// OSS Licenses
|
// OSS Licenses
|
||||||
implementation("com.google.android.gms:play-services-oss-licenses:17.0.0")
|
implementation("com.google.android.gms:play-services-oss-licenses:17.0.0")
|
||||||
|
|
||||||
// Open Food Fact
|
// Retrofit (Open Food Fact)
|
||||||
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||||
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
||||||
implementation("com.squareup.okhttp3:logging-interceptor:4.9.1")
|
implementation("com.squareup.okhttp3:logging-interceptor:4.9.1")
|
||||||
|
@ -1,24 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
<!-- Internet for OFF -->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
|
||||||
<!-- Notifications -->
|
<!-- Notifications for Water and Service -->
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||||
|
|
||||||
<!-- Google Fit -->
|
<!-- Phone Sensors for Steps -->
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
||||||
|
|
||||||
<!-- Phone Sensors -->
|
|
||||||
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
|
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
|
||||||
|
|
||||||
<!-- Samsung Health-->
|
|
||||||
<queries>
|
|
||||||
<package android:name="com.sec.android.app.shealth" />
|
|
||||||
</queries>
|
|
||||||
<uses-sdk tools:overrideLibrary="androidx.health.connect.client" />
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".Application"
|
android:name=".Application"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@ -28,16 +18,8 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.OpenHealth">
|
android:theme="@style/Theme.OpenHealth">
|
||||||
|
|
||||||
<!-- Samsung Health-->
|
<!-- TODO: Respect what daddy Google wants and try to remove the SplashScreen -->
|
||||||
<meta-data
|
<!-- Main Activity duh -->
|
||||||
android:name="com.samsung.android.health.permission.read"
|
|
||||||
android:value="com.samsung.health.step_count" />
|
|
||||||
|
|
||||||
<!-- Google Fit -->
|
|
||||||
<meta-data
|
|
||||||
android:name="com.google.android.gms.version"
|
|
||||||
android:value="@integer/google_play_services_version" />
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.MainActivity"
|
android:name=".ui.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
@ -49,6 +31,7 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<!-- CrashHandler -->
|
||||||
<activity android:name=".ui.ErrorActivity"
|
<activity android:name=".ui.ErrorActivity"
|
||||||
android:theme="@style/Theme.OpenHealth.NoActionBar"
|
android:theme="@style/Theme.OpenHealth.NoActionBar"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
@ -61,26 +44,12 @@
|
|||||||
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
|
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
|
||||||
android:theme="@style/Theme.OpenHealth" />
|
android:theme="@style/Theme.OpenHealth" />
|
||||||
|
|
||||||
<!-- Activity to show rationale of Health Connect permissions -->
|
<!-- the Service for the application -->
|
||||||
<activity
|
|
||||||
android:name=".ui.PrivacyPolicyActivity"
|
|
||||||
android:exported="true"
|
|
||||||
android:enabled="true">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" />
|
|
||||||
</intent-filter>
|
|
||||||
<!-- List of health data permissions -->
|
|
||||||
<meta-data
|
|
||||||
android:name="health_permissions"
|
|
||||||
android:resource="@array/health_permissions" />
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".services.OpenHealthService"
|
android:name=".services.OpenHealthService"
|
||||||
android:permission="android.permission.ACTIVITY_RECOGNITION" />
|
android:permission="android.permission.ACTIVITY_RECOGNITION" />
|
||||||
|
|
||||||
|
<!-- Android 13 Locales management if I remember correctly -->
|
||||||
<service
|
<service
|
||||||
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
|
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
@ -93,10 +62,4 @@
|
|||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
<queries>
|
|
||||||
<package android:name="com.google.android.apps.healthdata" />
|
|
||||||
</queries>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
buildscript {
|
buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
// Data Injection
|
||||||
classpath("com.google.dagger:hilt-android-gradle-plugin:2.40.5")
|
classpath("com.google.dagger:hilt-android-gradle-plugin:2.40.5")
|
||||||
|
|
||||||
// Safe Navigation
|
// Safe Navigation
|
||||||
@ -12,11 +13,16 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
// android app plugin ? (tbh idk what thoses "plugins" does)
|
||||||
id("com.android.application") version "7.3.1" apply false
|
id("com.android.application") version "7.3.1" apply false
|
||||||
|
// is it a lib? no, do I need it? IDK
|
||||||
id("com.android.library") version "7.3.1" apply false
|
id("com.android.library") version "7.3.1" apply false
|
||||||
|
|
||||||
|
// add kotlin compatibility :>
|
||||||
id("org.jetbrains.kotlin.android") version "1.6.21" apply false
|
id("org.jetbrains.kotlin.android") version "1.6.21" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cleanup the build directories
|
||||||
task("clean") {
|
task("clean") {
|
||||||
delete(rootProject.buildDir)
|
delete(rootProject.buildDir)
|
||||||
delete(project.buildDir)
|
delete(project.buildDir)
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest></manifest>
|
||||||
|
|
||||||
</manifest>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user