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:
|
||||
|
||||
| Permission | Why is it requested |
|
||||
|:----------------------:|:-----------------------------------------------------------------|
|
||||
| ACTIVITY_RECOGNITION | Device Steps Usage |
|
||||
| Permission | Why is it requested |
|
||||
|:--------------------:|:-----------------------------------------------------------|
|
||||
| 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
|
||||
|
||||
|
@ -1,8 +1,13 @@
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
// Android Application?
|
||||
id("com.android.application")
|
||||
|
||||
// Support for kotlin in Android
|
||||
kotlin("android")
|
||||
|
||||
// Data Injection
|
||||
id("dagger.hilt.android.plugin")
|
||||
|
||||
// Safe Navigation
|
||||
@ -15,12 +20,16 @@ plugins {
|
||||
kotlin("kapt")
|
||||
}
|
||||
|
||||
// The application ID
|
||||
val appID = "com.dzeio.openhealth"
|
||||
|
||||
// Languages
|
||||
// the application supported languages
|
||||
val locales = listOf("en", "fr")
|
||||
|
||||
// minimum application required SDK version to run
|
||||
val sdkMin = 21
|
||||
|
||||
// target SDK version
|
||||
val sdkTarget = 33
|
||||
|
||||
android {
|
||||
@ -122,8 +131,8 @@ android {
|
||||
dependencies {
|
||||
// Dzeio Charts
|
||||
implementation(project(":charts"))
|
||||
// implementation(project(":CrashHandler"))
|
||||
|
||||
// Dzeio Crash Handler
|
||||
implementation("com.dzeio:crashhandler:1.0.1")
|
||||
|
||||
// Core dependencies
|
||||
@ -135,8 +144,6 @@ dependencies {
|
||||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.5.1")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
|
||||
|
||||
// implementation("com.github.Aviortheking:crashhandler:0.2.3")
|
||||
|
||||
// Coroutines
|
||||
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-ktx:3.1.1")
|
||||
|
||||
|
||||
// Services
|
||||
implementation("androidx.work:work-runtime-ktx:2.7.1")
|
||||
|
||||
// Tests
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||
|
||||
// Graph
|
||||
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")
|
||||
|
||||
// Graphs test 2
|
||||
implementation("com.github.HackPlan:AndroidCharts:1.0.4")
|
||||
|
||||
// Hilt
|
||||
implementation("com.google.dagger:hilt-android: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
|
||||
implementation("androidx.room:room-runtime:2.4.3")
|
||||
kapt("androidx.room:room-compiler:2.4.3")
|
||||
@ -196,7 +190,7 @@ dependencies {
|
||||
// OSS Licenses
|
||||
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:converter-gson:2.9.0")
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:4.9.1")
|
||||
|
@ -1,24 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Internet for OFF -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<!-- Notifications -->
|
||||
<!-- Notifications for Water and Service -->
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
|
||||
<!-- Google Fit -->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
|
||||
<!-- Phone Sensors -->
|
||||
<!-- Phone Sensors for Steps -->
|
||||
<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
|
||||
android:name=".Application"
|
||||
android:allowBackup="true"
|
||||
@ -28,16 +18,8 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.OpenHealth">
|
||||
|
||||
<!-- Samsung Health-->
|
||||
<meta-data
|
||||
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" />
|
||||
|
||||
<!-- TODO: Respect what daddy Google wants and try to remove the SplashScreen -->
|
||||
<!-- Main Activity duh -->
|
||||
<activity
|
||||
android:name=".ui.MainActivity"
|
||||
android:exported="true"
|
||||
@ -49,6 +31,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- CrashHandler -->
|
||||
<activity android:name=".ui.ErrorActivity"
|
||||
android:theme="@style/Theme.OpenHealth.NoActionBar"
|
||||
android:exported="false" />
|
||||
@ -61,26 +44,12 @@
|
||||
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
|
||||
android:theme="@style/Theme.OpenHealth" />
|
||||
|
||||
<!-- Activity to show rationale of Health Connect permissions -->
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
<!-- the Service for the application -->
|
||||
<service
|
||||
android:name=".services.OpenHealthService"
|
||||
android:permission="android.permission.ACTIVITY_RECOGNITION" />
|
||||
|
||||
<!-- Android 13 Locales management if I remember correctly -->
|
||||
<service
|
||||
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
|
||||
android:enabled="false"
|
||||
@ -93,10 +62,4 @@
|
||||
|
||||
</application>
|
||||
|
||||
<queries>
|
||||
<package android:name="com.google.android.apps.healthdata" />
|
||||
</queries>
|
||||
|
||||
|
||||
|
||||
</manifest>
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
dependencies {
|
||||
// Data Injection
|
||||
classpath("com.google.dagger:hilt-android-gradle-plugin:2.40.5")
|
||||
|
||||
// Safe Navigation
|
||||
@ -12,11 +13,16 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
// android app plugin ? (tbh idk what thoses "plugins" does)
|
||||
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
|
||||
|
||||
// add kotlin compatibility :>
|
||||
id("org.jetbrains.kotlin.android") version "1.6.21" apply false
|
||||
}
|
||||
|
||||
// Cleanup the build directories
|
||||
task("clean") {
|
||||
delete(rootProject.buildDir)
|
||||
delete(project.buildDir)
|
||||
|
@ -1,4 +1,2 @@
|
||||
<?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