Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #110

Merged
merged 50 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b6d1569
Playstore version
pachi81 Nov 28, 2023
36cfe95
Fix notification permission for API 33
pachi81 Nov 28, 2023
339261e
Fix alarm permission
pachi81 Dec 4, 2023
b76385b
Fix settings orientation
pachi81 Dec 4, 2023
72631c2
Remove Android Auto Media Player
pachi81 Dec 4, 2023
ccd31a2
Add rotary input
pachi81 Dec 5, 2023
e384370
New screenshots
pachi81 Dec 5, 2023
9d582b4
Change debug handling
pachi81 Dec 5, 2023
6c9c4ed
Fix style and font size
pachi81 Dec 5, 2023
82a1f2d
Do not recalculate alarm from intern
pachi81 Dec 5, 2023
0d5275e
New PS version
pachi81 Dec 5, 2023
715a3a9
Remove AA media player
pachi81 Dec 5, 2023
d6b2562
New GlucoDataAuto App
pachi81 Dec 5, 2023
ef015b4
Add context to notifier calls
pachi81 Dec 5, 2023
4fe8534
Remove Alarm, if no receiver present
pachi81 Dec 5, 2023
689a92f
Add settings for GlucoDataAuto
pachi81 Dec 6, 2023
cf7457b
Update strings.xml
froster82 Dec 6, 2023
324d783
(Re)move Android Auto part
pachi81 Dec 6, 2023
9fed549
Fix null pointer
pachi81 Dec 6, 2023
816a081
Replace icon
pachi81 Dec 6, 2023
9ad63d4
Update images
pachi81 Dec 6, 2023
5479317
Change target for GDA
pachi81 Dec 6, 2023
b18f703
Merge remote-tracking branch 'master/develop' into develop
pachi81 Dec 6, 2023
0bd7f41
Fix source
pachi81 Dec 6, 2023
58451b8
Fix
pachi81 Dec 6, 2023
e6caf34
Fix for GDA resources
pachi81 Dec 7, 2023
6095b6e
PS screenshots
pachi81 Dec 12, 2023
16b4249
AA proguard
pachi81 Dec 12, 2023
1159466
Update README.md
pachi81 Dec 13, 2023
afe12d2
Update INSTALLATION.md
pachi81 Dec 13, 2023
1d0d5d0
Create GlucoDataAuto.md
pachi81 Dec 13, 2023
e21bef7
Update INSTALLATION_DE.md
pachi81 Dec 13, 2023
9923180
Update README_DE.md
pachi81 Dec 13, 2023
c7cbf79
Create GlucoDataAuto_DE.md
pachi81 Dec 13, 2023
c031a77
Update GlucoDataAuto.md
pachi81 Dec 13, 2023
e433dae
Update README_PL.md
pachi81 Dec 13, 2023
9455c9f
Update INSTALLATION_PL.md
pachi81 Dec 13, 2023
ec531af
Create GlucoDataAuto_PL.md
pachi81 Dec 13, 2023
ae38e73
Update README.md
pachi81 Dec 13, 2023
b9ba016
Update README_DE.md
pachi81 Dec 13, 2023
c7dcb36
Update README_PL.md
pachi81 Dec 13, 2023
0ea23d4
Update GlucoDataAuto_PL.md
pachi81 Dec 13, 2023
9fed9c8
Update GlucoDataAuto.md
pachi81 Dec 13, 2023
7dd5a86
Update GlucoDataAuto_DE.md
pachi81 Dec 13, 2023
b0358f4
Update GlucoDataAuto_DE.md
pachi81 Dec 13, 2023
ea34445
Update GlucoDataAuto_PL.md
pachi81 Dec 13, 2023
482d53f
Update GlucoDataAuto.md
pachi81 Dec 13, 2023
aa22fca
Update GlucoDataAuto_PL.md
froster82 Dec 13, 2023
1dc5d6c
Update GlucoDataAuto.md
froster82 Dec 13, 2023
b56e824
Update GlucoDataAuto_PL.md
froster82 Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions auto/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
83 changes: 83 additions & 0 deletions auto/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}

android {
namespace 'de.michelinside.glucodataauto'
compileSdk rootProject.compileSdk

defaultConfig {
applicationId "de.michelinside.glucodataauto"
minSdk rootProject.minSdk
targetSdk rootProject.targetSdk
versionCode 1000 + rootProject.versionCode
versionName rootProject.versionName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
// Enable ProGuard
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "string", "app_name", "GlucoDataAuto"
}
debug {
applicationIdSuffix '.debug'
minifyEnabled false
resValue "string", "app_name", "GlucoDataAuto"
}
applicationVariants.all {
// this method is use to rename your all apk weather
// it may be signed or unsigned(debug apk)
variant ->
variant.outputs.each {
// on below line we are setting a
// name to our apk as GlucoDataAuto.apk
output ->
def name = "GlucoDataAuto_" + versionName + ".apk"
// on below line we are setting the
// outputFile Name to our apk file.
output.outputFileName = name
}
}

}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
}

dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.joaomgcd:taskerpluginlibrary:0.4.4'
implementation project(path: ':common')
implementation "androidx.car.app:app:1.2.0"
implementation "androidx.preference:preference:1.2.1"
implementation "com.jaredrummler:colorpicker:1.1.0"
implementation "androidx.media:media:1.7.0"
}

afterEvaluate {
//noinspection ConfigurationAvoidance
def assembleRelease = tasks.getByPath(':auto:assembleRelease')
def copyAndroidApksPostBuild = tasks.register('copyAndroidApksPostBuild', Copy) {
dependsOn assembleRelease
from "${projectDir}/release"
include '**/*.apk'
into rootProject.releasePath
}
assembleRelease.finalizedBy(copyAndroidApksPostBuild)
}
33 changes: 33 additions & 0 deletions auto/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn **
-keep class **
-keepclassmembers class *{*;}
-keepattributes *

# --------------------------------------------------------------------
# REMOVE all debug log messages
# --------------------------------------------------------------------
#-assumenosideeffects class android.util.Log {
# public static *** d(...);
# public static *** v(...);
#}
100 changes: 100 additions & 0 deletions auto/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />


<queries>
<package android:name="tk.glucodata" />
</queries>
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent>
</queries>

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:persistent="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.GlucoDataHandler"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<meta-data
android:name="de.michelinside.glucodataauto"
android:value="" />
</activity>
<activity
android:name=".SettingsActivity"
android:label="@string/menu_settings"
android:parentActivityName=".MainActivity"
tools:ignore="LockedOrientationActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<receiver
android:name=".GlucoDataActionReceiver"
android:enabled="true"
android:exported="true"
tools:ignore="ExportedReceiver">
<intent-filter>
<action android:name="de.michelinside.glucodatahandler.GLUCODATA" />
</intent-filter>
</receiver>
<receiver
android:name="de.michelinside.glucodatahandler.common.receiver.GlucoseDataReceiver"
android:enabled="true"
android:exported="true"
tools:ignore="ExportedReceiver">
<intent-filter>
<action android:name="glucodata.Minute" />
</intent-filter>
</receiver>
<receiver
android:name="de.michelinside.glucodatahandler.common.receiver.XDripBroadcastReceiver"
android:enabled="true"
android:exported="true"
tools:ignore="ExportedReceiver">
<intent-filter>
<action android:name="com.eveningoutpost.dexdrip.BgEstimate" />
</intent-filter>
</receiver>
<receiver android:name="de.michelinside.glucodatahandler.common.tasks.TimeAlarmReceiver" />

<service
android:name=".android_auto.CarMediaBrowserService"
android:exported="true"
tools:ignore="ExportedService">
<intent-filter>
<action android:name="android.media.browse.MediaBrowserService" />
</intent-filter>
</service>

<meta-data
android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc" />
</application>

</manifest>
Binary file added auto/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions auto/src/main/java/GlucoDataActionReceiver.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package de.michelinside.glucodataauto

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
import de.michelinside.glucodatahandler.common.Constants
import de.michelinside.glucodatahandler.common.ReceiveData
import de.michelinside.glucodatahandler.common.notifier.DataSource

open class GlucoDataActionReceiver: BroadcastReceiver() {
private val LOG_ID = "GDH.AA.GlucoDataActionReceiver"
override fun onReceive(context: Context, intent: Intent) {
try {
val action = intent.action
Log.v(LOG_ID, intent.action + " receveived: " + intent.extras.toString())
if (action != Constants.GLUCODATA_ACTION) {
Log.e(LOG_ID, "action=" + action + " != " + Constants.GLUCODATA_ACTION)
return
}
val extras = intent.extras
if (extras != null) {
if (extras.containsKey(Constants.SETTINGS_BUNDLE)) {
val bundle = extras.getBundle(Constants.SETTINGS_BUNDLE)
Log.d(LOG_ID, "Glucose settings receceived: " + bundle.toString())
ReceiveData.setSettings(context, bundle!!)
extras.remove(Constants.SETTINGS_BUNDLE)
}
ReceiveData.handleIntent(context, DataSource.JUGGLUCO, extras, true)
}
} catch (exc: Exception) {
Log.e(LOG_ID, "Receive exception: " + exc.message.toString() )
}
}
}
Loading