Skip to content

Commit

Permalink
Merge pull request #74 from Semper-Viventem/master
Browse files Browse the repository at this point in the history
Release 0.20.3-beta
  • Loading branch information
Semper-Viventem committed Dec 22, 2023
2 parents a6311be + 95af8e6 commit 02bad9a
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
minSdk = 29
targetSdk = 34
versionCode = (System.currentTimeMillis() / 1000).toInt()
versionName = "0.20.2-beta"
versionName = "0.20.3-beta"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down
18 changes: 15 additions & 3 deletions app/src/main/java/f/cking/software/service/BgScanService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,29 @@ package f.cking.software.service
import android.app.Service
import android.content.Context
import android.content.Intent
import android.content.pm.ServiceInfo
import android.os.Handler
import android.os.IBinder
import android.os.Looper
import f.cking.software.data.helpers.*
import f.cking.software.data.helpers.BleScannerHelper
import f.cking.software.data.helpers.LocationProvider
import f.cking.software.data.helpers.NotificationsHelper
import f.cking.software.data.helpers.PermissionHelper
import f.cking.software.data.helpers.PowerModeHelper
import f.cking.software.domain.interactor.AnalyseScanBatchInteractor
import f.cking.software.domain.interactor.CheckProfileDetectionInteractor
import f.cking.software.domain.interactor.SaveReportInteractor
import f.cking.software.domain.interactor.SaveScanBatchInteractor
import f.cking.software.domain.model.BleScanDevice
import f.cking.software.domain.model.JournalEntry
import kotlinx.coroutines.*
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Runnable
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.cancel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.koin.android.ext.android.inject
import timber.log.Timber

Expand Down Expand Up @@ -85,7 +96,8 @@ class BgScanService : Service() {
notificationsHelper.buildForegroundNotification(
NotificationsHelper.ServiceNotificationContent.NoDataYet,
createCloseServiceIntent(this)
)
),
ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE or ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION,
)

permissionHelper.checkBlePermissions(
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/drawable/ic_monochrome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<vector android:height="100dp" android:viewportHeight="1000"
android:viewportWidth="1000" android:width="100dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000"
android:pathData="M465.9,15c-55.1,4.9 -106.9,18 -154.3,39 -11.5,5.1 -13.1,6.1 -13.4,8.4 -0.2,1.4 -1.2,3.1 -2.3,3.6 -1.7,1 -1.9,2.3 -1.9,16.5l0,15.4 -3,1.6c-1.6,0.8 -3.1,1.5 -3.5,1.5 -0.3,-0 -0.5,-7.9 -0.5,-17.5 0,-9.6 -0.2,-17.5 -0.5,-17.5 -0.3,-0 -4.3,2.1 -9,4.6l-8.5,4.6 0,-10.6c0,-5.8 -0.4,-10.6 -0.8,-10.6 -0.8,-0 -22.4,13.1 -31.4,19 -2.5,1.7 -3.8,3.3 -3.8,4.7 0,1.3 -0.9,2.8 -2,3.5 -1.8,1.1 -2,2.4 -2,10.3l0,9 -10.7,8c-18.5,13.7 -34.1,27.3 -52.5,45.6l-17.7,17.7 -0.3,-7.2 -0.3,-7.1 -4.5,5.6c-20.3,25.1 -21,26.2 -21,34.9 0,6.4 -0.2,7.1 -4.3,12.6 -36.9,50.2 -66.3,112.3 -81.2,171.7 -3.9,15.3 -10.5,49.1 -10.5,53.4 0,1 2.4,1.3 8.6,1.3 8.4,-0 8.6,-0 8.1,2.2 -0.3,1.3 -1.1,8.6 -1.7,16.3 -0.6,7.7 -1.4,15.9 -1.6,18.2l-0.5,4.3 -6.5,-0 -6.4,-0 0,3.5c0,2.8 -0.4,3.5 -2,3.5 -1.9,-0 -2,0.7 -2,17.2 0,41.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16.2,-15.2 -20.9,-19.6l-8.5,-8.2 12.1,-12.8c6.7,-7.1 16.7,-17.4 22.2,-22.9l10.1,-10 48.6,49.2c30.8,31.3 49.3,49.3 50.5,49.3 1.6,-0 1.9,-0.6 1.7,-3.8 -0.1,-2 -0.1,-45.7 0,-97l0.2,-93.3 2.3,1.2c1.2,0.7 5.4,3.7 9.3,6.8zM831,325.5l0,26.5 -2.5,-0 -2.5,-0 0,-26.5 0,-26.5 2.5,-0 2.5,-0 0,26.5zM683,327.5l0,12.5 -4.5,-0 -4.5,-0 0,-12.5 0,-12.5 4.5,-0 4.5,-0 0,12.5zM142,334.5l0,5.5 -9,-0 -9,-0 0,-5.5 0,-5.5 9,-0 9,-0 0,5.5zM715,766l0,11 -4.5,-0 -4.5,-0 0,-11 0,-11 4.5,-0 4.5,-0 0,11zM573,896.5l0,21.5 -6,-0 -6,-0 0,-21.5 0,-21.5 6,-0 6,-0 0,21.5z" android:strokeColor="#00000000"/>
<path android:fillColor="#000000"
android:pathData="M503.8,323c-0.1,0.5 -0.2,6.4 0,13l0.3,12 6.5,-0 6.5,-0 -0.3,42.5c-0.3,49.1 -1.1,46.2 9.7,37.2 3.4,-2.8 12.4,-10.2 19.9,-16.2 7.5,-6.1 13.6,-11.7 13.6,-12.6 0,-0.9 0.7,-2.2 1.5,-2.9 1.3,-1 1.5,-5.1 1.5,-25.1l0,-23.9 -2.4,-0c-2,-0 -2.5,0.6 -2.8,3l-0.3,3 -4.3,-2.8c-2.3,-1.6 -4,-3.1 -3.7,-3.4 0.3,-0.3 -0.2,-1.1 -1,-1.8 -1.2,-1 -1.9,-1 -2.7,-0.2 -0.7,0.7 -3.3,1.2 -5.9,1.2 -4.1,-0 -5.4,-0.6 -11.1,-5.3 -11.6,-9.3 -16.2,-13.1 -19.3,-15.9 -3.1,-2.9 -5.1,-3.5 -5.7,-1.8z" android:strokeColor="#00000000"/>
<path android:fillColor="#000000"
android:pathData="M568,384.5c0,22.2 0,22.7 1.9,21.4 8.3,-6 24.1,-19.7 24.1,-20.9 0,-2.1 -9.7,-11 -22.2,-20.4l-3.8,-2.8 0,22.7z" android:strokeColor="#00000000"/>
<path android:fillColor="#000000"
android:pathData="M516.8,594.7c0.2,16.4 0.1,33.1 -0.3,37l-0.7,7.3 -16.6,-0c-9.2,-0 -17.7,0.3 -18.9,0.6 -2.3,0.6 -2.3,0.8 -2.3,18.5 0,12.4 0.3,17.9 1.1,17.9 0.9,-0 16.3,-11.1 17.9,-12.9 0.3,-0.3 3,-2.6 6,-5.1 3,-2.5 6.4,-5.2 7.5,-6.1 1.1,-0.9 4.7,-3.9 8,-6.5l6,-4.8 19.8,-0.4 19.9,-0.4 10.3,-8.2c5.7,-4.4 10.4,-8.8 10.4,-9.6 0.1,-0.9 -6,-6.7 -13.5,-13 -7.5,-6.3 -14.5,-12.4 -15.6,-13.5 -4.2,-4.4 -4.8,-5.2 -4.8,-6.3 0,-0.6 -2.2,-2.8 -4.9,-4.9 -2.7,-2.1 -8.8,-7.1 -13.5,-11.1 -4.7,-4.1 -9,-7.1 -9.5,-6.8 -0.5,0.4 -1.2,0.2 -1.6,-0.4 -0.3,-0.5 -1.6,-1 -2.8,-1l-2.2,-0 0.3,29.7z" android:strokeColor="#00000000"/>
</vector>
12 changes: 10 additions & 2 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
<monochrome>
<inset
android:drawable="@drawable/ic_monochrome"
android:insetLeft="20dp"
android:insetTop="20dp"
android:insetRight="20dp"
android:insetBottom="20dp" />
</monochrome>
</adaptive-icon>
8 changes: 8 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome>
<inset
android:drawable="@drawable/ic_monochrome"
android:insetLeft="20dp"
android:insetTop="20dp"
android:insetRight="20dp"
android:insetBottom="20dp" />
</monochrome>
</adaptive-icon>
1 change: 1 addition & 0 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<!-- Customize your theme here. -->
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar">false</item>
<item name="android:windowBackground">@color/surface_color</item>
</style>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<!-- Customize your theme here. -->
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar">true</item>
<item name="android:windowBackground">@color/surface_color</item>
</style>
</resources>

0 comments on commit 02bad9a

Please sign in to comment.