Skip to content

Commit

Permalink
Merge pull request #144 from pachi81/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
pachi81 authored Jun 5, 2024
2 parents d6cc2d9 + 26fb2f1 commit 8ec6c07
Show file tree
Hide file tree
Showing 218 changed files with 12,542 additions and 2,216 deletions.
14 changes: 6 additions & 8 deletions .idea/misc.xml

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

9 changes: 6 additions & 3 deletions auto/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugins {
id 'org.jetbrains.kotlin.android'
}

project.ext.set("releasePath", "D:/Daten/Michel/OneDrive/Projekte/Release")

android {
namespace 'de.michelinside.glucodataauto'
compileSdk rootProject.compileSdk
Expand All @@ -12,7 +14,7 @@ android {
minSdk rootProject.minSdk
targetSdk rootProject.targetSdk
versionCode 1025
versionName "0.9.10"
versionName "1.0-beta1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -29,6 +31,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-dev-rules.pro'
versionNameSuffix '-dev'
resValue "string", "app_name", "GlucoDataAuto"
signingConfig signingConfigs.debug
}
debug {
minifyEnabled false
Expand Down Expand Up @@ -69,9 +72,9 @@ android {
}

dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.joaomgcd:taskerpluginlibrary:0.4.4'
implementation project(path: ':common')
Expand Down
32 changes: 32 additions & 0 deletions auto/proguard-dev-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 *** v(...);
}
4 changes: 3 additions & 1 deletion auto/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
android:value="" />
</activity>
<activity
android:name=".SettingsActivity"
android:name=".preferences.SettingsActivity"
android:label="@string/menu_settings"
android:parentActivityName=".MainActivity"
tools:ignore="LockedOrientationActivity">
Expand Down Expand Up @@ -104,6 +104,8 @@
</intent-filter>
</receiver>
<receiver android:name="de.michelinside.glucodatahandler.common.tasks.TimeAlarmReceiver" />
<receiver android:name="de.michelinside.glucodatahandler.common.tasks.SourceAlarmReceiver" />
<receiver android:name="de.michelinside.glucodatahandler.common.receiver.InternalActionReceiver" />

<service
android:name=".android_auto.CarMediaBrowserService"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import de.michelinside.glucodatahandler.common.notification.Channels
import de.michelinside.glucodatahandler.common.notifier.InternalNotifier
import de.michelinside.glucodatahandler.common.notifier.NotifySource
import de.michelinside.glucodatahandler.common.tasks.BackgroundWorker
import de.michelinside.glucodatahandler.common.tasks.SourceTaskService
import de.michelinside.glucodatahandler.common.tasks.TimeTaskService
import de.michelinside.glucodatahandler.common.utils.Utils
import de.michelinside.glucodatahandler.common.utils.PackageUtils

class GlucoDataServiceAuto: Service() {
companion object {
Expand All @@ -37,7 +38,8 @@ class GlucoDataServiceAuto: Service() {
if(!init) {
Log.v(LOG_ID, "init called")
GlucoDataService.context = context
TimeTaskService.useWorker = true
//TimeTaskService.useWorker = true
//SourceTaskService.useWorker = true
ReceiveData.initData(context)
CarConnection(context.applicationContext).type.observeForever(GlucoDataServiceAuto::onConnectionStateUpdated)
init = true
Expand Down Expand Up @@ -91,8 +93,9 @@ class GlucoDataServiceAuto: Service() {
fun startDataSync(context: Context) {
try {
if (dataSyncCount == 0) {
Log.d(LOG_ID, "startDataSync")
Log.d(LOG_ID, "startDataSync count: $dataSyncCount")
TimeTaskService.run(context)
SourceTaskService.run(context)
sendStateBroadcast(context, true)
}
dataSyncCount++
Expand Down Expand Up @@ -196,7 +199,7 @@ class GlucoDataServiceAuto: Service() {
private fun getNotification(): Notification {
Channels.createNotificationChannel(this, ChannelType.ANDROID_AUTO_FOREGROUND)

val pendingIntent = Utils.getAppIntent(this, MainActivity::class.java, 11, false)
val pendingIntent = PackageUtils.getAppIntent(this, MainActivity::class.java, 11, false)

return Notification.Builder(this, ChannelType.ANDROID_AUTO_FOREGROUND.channelId)
.setContentTitle(getString(de.michelinside.glucodatahandler.common.R.string.activity_main_car_connected_label))
Expand Down
Loading

0 comments on commit 8ec6c07

Please sign in to comment.