Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
5f9c644
create empty UI and navigation for tracker export
imbissbudenaesthetik Apr 21, 2025
d672438
initial implementation of the PDF creation
imbissbudenaesthetik Apr 21, 2025
999fb4b
Merge branch 'development' into pdfExport
imbissbudenaesthetik Apr 23, 2025
9ef3744
create necessary views for new pdf creation, hide old approach
imbissbudenaesthetik Apr 23, 2025
d2af954
basic pdf creation
imbissbudenaesthetik Apr 25, 2025
f601522
implement working map and pagination
imbissbudenaesthetik Apr 26, 2025
b8a3b66
add warning for 15 minute algorithm matching in pdf export
imbissbudenaesthetik Apr 26, 2025
219fa4e
add preview before creating pdf document
imbissbudenaesthetik Apr 26, 2025
010ee3f
Merge branch 'development' into pdfExport
imbissbudenaesthetik Apr 26, 2025
c930c85
add error message, when no internet connection during pdf creation is…
imbissbudenaesthetik Apr 29, 2025
e2e733f
Merge branch 'development' into pdfExport
imbissbudenaesthetik Apr 30, 2025
674eab5
fix build error
imbissbudenaesthetik Apr 30, 2025
106fb0e
Merge branch 'development' into pdfExport
imbissbudenaesthetik Apr 30, 2025
4893204
add Debug Mode toggle for disabling ble error messages
imbissbudenaesthetik May 2, 2025
07095dd
update gradle and some dependencies
imbissbudenaesthetik May 7, 2025
ea8726e
safer thread handling of PermanentBluetoothScanner
imbissbudenaesthetik May 7, 2025
9d75911
add Website to InformationFragment
imbissbudenaesthetik May 7, 2025
c3c64ab
add Website to InformationFragment
imbissbudenaesthetik May 18, 2025
95a39b3
Merge branch 'development' into pdfExport
imbissbudenaesthetik May 18, 2025
a06f081
show AirGuard Version Number on pdf report
imbissbudenaesthetik May 18, 2025
86f68a5
handle tracker ignored as additional state for pdf export, fix colors…
imbissbudenaesthetik May 18, 2025
c8d1668
update kotlin version to 2.1.21 and update dependencies
imbissbudenaesthetik May 23, 2025
2a23bcc
fix onboarding loop bug
imbissbudenaesthetik May 23, 2025
61699fd
adjust Android 15 System Bar Configuration
imbissbudenaesthetik May 23, 2025
786c67e
initial implementation of review controller
imbissbudenaesthetik May 26, 2025
18cf393
update gradle
imbissbudenaesthetik Jun 7, 2025
1d7ab6a
update dependencies
imbissbudenaesthetik Jun 11, 2025
4b6f86c
fix: pdf export shows that the tracker is following even if the notif…
imbissbudenaesthetik Jun 20, 2025
8996f73
pdf export: optimize loading times by creating map of locations inste…
imbissbudenaesthetik Jun 20, 2025
f169784
optimize loading in pdf export by adding new indices to beacon
imbissbudenaesthetik Jun 20, 2025
2adf75a
fix intent handling for notifications on newer android versions
imbissbudenaesthetik Jun 21, 2025
9c85ad2
update dependencies, kotlin version to 2.2.0 and gradle
imbissbudenaesthetik Jun 25, 2025
36dc91e
change last name of maintainer
imbissbudenaesthetik Jul 2, 2025
3c7b460
update dependencies
imbissbudenaesthetik Jul 2, 2025
412b411
fix crash in some navigation cases in TrackingFragment
imbissbudenaesthetik Jul 7, 2025
87d111b
update dependencies
imbissbudenaesthetik Jul 7, 2025
9954db4
update grade and some dependencies
imbissbudenaesthetik Jul 16, 2025
adc51a2
update some dependencies
imbissbudenaesthetik Jul 23, 2025
21f24af
fix some issues with the PermanentBluetoothScanner
imbissbudenaesthetik Jul 23, 2025
d99750d
fix issues in BluetoothLeService
imbissbudenaesthetik Jul 23, 2025
b2788d7
fix issues with gatt disconnect in Utility
imbissbudenaesthetik Jul 23, 2025
478b5ba
increment version number to 2.5.1
imbissbudenaesthetik Jul 27, 2025
81e0f6c
show error message on home screen if samsung android 15 ble bug occurs
imbissbudenaesthetik Aug 5, 2025
6d80330
update gradle and dependencies
imbissbudenaesthetik Aug 5, 2025
fad4852
Merge branch 'development' into optimized_scanning
imbissbudenaesthetik Aug 5, 2025
69725af
improve Bluetooth Error Detection
imbissbudenaesthetik Aug 11, 2025
1f60b11
add ScanOrchestrator to avoid accessing Bluetooth Resources on too ma…
imbissbudenaesthetik Aug 11, 2025
150a4dd
add Listeners to check if bluetooth or location is enabled in the system
imbissbudenaesthetik Aug 13, 2025
10d318a
replace specific bluetooth error message on main page with generic one
imbissbudenaesthetik Aug 13, 2025
eb9166a
bypass High Priority Scan in ScanOrchestrator immediately to ensure c…
imbissbudenaesthetik Aug 18, 2025
1fe4965
upgrade gradle, dependencies and kotlin version and target Android 16
imbissbudenaesthetik Aug 22, 2025
6281681
add dependency for Android 16 predictive back compatibility
imbissbudenaesthetik Aug 23, 2025
14fdc75
make PermanentBluetoothScheduler a toggle in the expert settings
imbissbudenaesthetik Aug 25, 2025
200d8b7
increase version number to 2.6.0
imbissbudenaesthetik Aug 28, 2025
beda836
update dependencies
imbissbudenaesthetik Aug 29, 2025
57de63e
add comment function for each individual tracker
imbissbudenaesthetik Sep 1, 2025
3404af0
show comment function only if database device exists
imbissbudenaesthetik Sep 1, 2025
8541049
add japanese and german translations
imbissbudenaesthetik Sep 1, 2025
f3f3184
reduce throttle window in ScanOrchestrator to ensure bluetooth scan a…
imbissbudenaesthetik Sep 4, 2025
3dc5d05
Merge branch 'development' into reviewController
imbissbudenaesthetik Sep 4, 2025
7ed71f4
upgrade gradle and some dependencies
imbissbudenaesthetik Sep 4, 2025
dbacf89
update proguard rules for ScanOrchestrator
imbissbudenaesthetik Sep 8, 2025
dd95266
fix default value for permanent bluetooth scanner
imbissbudenaesthetik Sep 8, 2025
8515c92
set permanentscanner default to disabled
imbissbudenaesthetik Sep 9, 2025
e10abe6
F-Droid Release 2.6.0
imbissbudenaesthetik Sep 9, 2025
4455f38
Merge branch 'development' into reviewController
imbissbudenaesthetik Sep 9, 2025
1337f58
update dependencies
imbissbudenaesthetik Sep 9, 2025
32cca2c
fix screenshots in ReadMe
imbissbudenaesthetik Sep 9, 2025
ec506f9
Merge branch 'main' into development
imbissbudenaesthetik Sep 9, 2025
ee7785f
Notification permission can now be denied, if disabled a warning will…
imbissbudenaesthetik Sep 15, 2025
6217e79
Background Location can now be denied, if disabled a warning will be …
imbissbudenaesthetik Sep 16, 2025
708b530
fix a bug where false alarm toggle was not displayed correctly
imbissbudenaesthetik Sep 16, 2025
c0d57d6
fix issue where notification buttons where not properly processed and…
imbissbudenaesthetik Sep 18, 2025
60554d0
fix issue where notification dismissal was not processed properly
imbissbudenaesthetik Sep 18, 2025
6ccbd99
fix map render issue under certain memory conditions when accessing t…
imbissbudenaesthetik Sep 20, 2025
6545c72
fix edge to edge problems with menus accessed from a notification
imbissbudenaesthetik Sep 20, 2025
f7b7b4a
fix old tracker deletion calculating with outdated times
imbissbudenaesthetik Sep 21, 2025
3a464e5
fix back navigation not working when application is accessed through …
imbissbudenaesthetik Sep 21, 2025
30a60c0
update dependencies, increase Version number to 2.6.1
imbissbudenaesthetik Sep 22, 2025
2a05525
F-Droid Release 2.6.1
imbissbudenaesthetik Sep 29, 2025
96e28eb
update build workflow
imbissbudenaesthetik Sep 29, 2025
e4ec230
update dependencies, remove google Play Review Controller and all goo…
imbissbudenaesthetik Sep 30, 2025
9ffb704
reduce ANR
imbissbudenaesthetik Sep 30, 2025
103c9a1
PermanentScanner can now only be used between Android 12 and 14, as i…
imbissbudenaesthetik Sep 30, 2025
83b5cf7
loading improvements when accesing the TrackingView from the manual scan
imbissbudenaesthetik Sep 30, 2025
a355dbb
ignore Apple Devices when risk sensitivity is not set to high to avoi…
imbissbudenaesthetik Sep 30, 2025
ecd3aab
fix system bar configuration in Onboarding, update some strings for c…
imbissbudenaesthetik Oct 1, 2025
1cece57
fix consistency bug when loading drawable for each tracker
imbissbudenaesthetik Oct 2, 2025
423607c
add slightly more consistency to display of device name, clean up code
imbissbudenaesthetik Oct 2, 2025
8a9a83a
fix clipping issue on manual scan
imbissbudenaesthetik Oct 2, 2025
74621df
add animation to info button in Manual Scan
imbissbudenaesthetik Oct 2, 2025
d1e997c
increase version number to 2.6.2
imbissbudenaesthetik Oct 5, 2025
70ed94f
F-Droid Release 2.6.2
imbissbudenaesthetik Oct 8, 2025
73ad1c6
Merge branch 'main' into development
imbissbudenaesthetik Oct 8, 2025
4dafb98
simply Github Action Check
imbissbudenaesthetik Oct 8, 2025
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
19 changes: 10 additions & 9 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v2
- name: Set up JDK 17 with Gradle cache
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
distribution: temurin
java-version: 17
cache: gradle

- name: Build app
uses: gradle/gradle-command-action@v2
with:
arguments: build
- name: Grant execute permission for Gradle wrapper
run: chmod +x ./gradlew

- name: Build (assemble & test)
run: ./gradlew build --no-daemon
2 changes: 1 addition & 1 deletion api.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
API_KEY="3acPl2TP.lAyeGkWWlqPrgfWI9WbzqKKHejOmahJ3"
API_KEY="VVZZfRjk.Ijo01HvEAbi7XpcNIrlQLyhnj0S3OLwh"
API_BASE_ADDRESS="https://tpe.seemoo.tu-darmstadt.de/api/"
26 changes: 13 additions & 13 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
applicationId "de.seemoo.at_tracking_detection"
minSdkVersion 28
targetSdk = 36
versionCode 55
versionName "2.6.1"
versionCode 56
versionName "2.6.2"
buildConfigField "String", "API_KEY", apiProperties["API_KEY"]
buildConfigField "String", "API_BASE_ADDRESS", apiProperties["API_BASE_ADDRESS"]

Expand Down Expand Up @@ -92,8 +92,8 @@ dependencies {
implementation 'com.google.android.material:material:1.13.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.vectordrawable:vectordrawable:1.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.9.4'
implementation 'androidx.navigation:navigation-ui-ktx:2.9.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.9.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.9.5'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.9.4'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.4'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
Expand Down Expand Up @@ -159,23 +159,23 @@ dependencies {
// Integration with activities
implementation 'androidx.activity:activity-compose:1.11.0'
// Compose Material3 Design
implementation 'androidx.compose.material3:material3:1.3.2'
implementation 'androidx.compose.material3:material3-window-size-class:1.3.2'
implementation 'androidx.compose.material3:material3:1.4.0'
implementation 'androidx.compose.material3:material3-window-size-class:1.4.0'
// Animations
implementation 'androidx.compose.animation:animation:1.9.1'
implementation 'androidx.compose.animation:animation:1.9.2'
// Tooling support (Previews, etc.)
implementation 'androidx.compose.ui:ui-tooling:1.9.1'
implementation 'androidx.compose.ui:ui-tooling:1.9.2'
// Integration with ViewModels
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.9.4'
// UI Tests
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.9.1'
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.9.2'
// When using a MDC theme
implementation "com.google.android.material:compose-theme-adapter:1.2.1"

// Google Review Handling
implementation("com.google.android.play:review:2.0.2")
implementation("com.google.android.play:review-ktx:2.0.2")
implementation("com.google.android.gms:play-services-base:18.8.0")
// Google Review Handling (only active in Google Play Builds done from the googlePlyStore Branch)
// implementation("com.google.android.play:review:2.0.2")
// implementation("com.google.android.play:review-ktx:2.0.2")
// implementation("com.google.android.gms:play-services-base:18.9.0")
}

ksp {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"
android:required="true" />
<!-- Receive boot completed to re-establish schedules after reboot -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<!-- Required for finding Bluetooth trackers -->
<uses-permission
android:name="android.permission.BLUETOOTH"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ import de.seemoo.at_tracking_detection.util.Utility
import de.seemoo.at_tracking_detection.worker.BackgroundWorkScheduler
import de.seemoo.at_tracking_detection.worker.SetExactAlarmPermissionChangedReceiver
import fr.bipi.treessence.file.FileLoggerTree
import kotlinx.coroutines.DelicateCoroutinesApi
import timber.log.Timber
import java.io.File
import java.time.LocalDateTime
import javax.inject.Inject
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch


@HiltAndroidApp
Expand Down Expand Up @@ -78,6 +82,7 @@ class ATTrackingDetectionApplication : Application(), Configuration.Provider {
.setWorkerFactory(workerFactory)
.build()

@OptIn(DelicateCoroutinesApi::class)
override fun onCreate() {
instance = this
super.onCreate()
Expand Down Expand Up @@ -116,7 +121,13 @@ class ATTrackingDetectionApplication : Application(), Configuration.Provider {
// }

if (SharedPrefs.shareData) {
backgroundWorkScheduler.scheduleShareData()
GlobalScope.launch(Dispatchers.Default) {
try {
backgroundWorkScheduler.scheduleShareData()
} catch (t: Throwable) {
Timber.w(t, "Failed scheduling share data on startup")
}
}
}

if (SharedPrefs.lastDataDonation == null) {
Expand All @@ -129,32 +140,12 @@ class ATTrackingDetectionApplication : Application(), Configuration.Provider {

registerBroadcastReceiver()

if (BuildConfig.DEBUG) {
// // Get a location for testing
// Timber.d("Request location")
// val startTime = Date()
// val locationRequester: LocationRequester = object : LocationRequester() {
// override fun receivedAccurateLocationUpdate(location: Location) {
// val endTime = Date()
// val duration = (endTime.time - startTime.time) / 1000
// Timber.d("Got location $location after $duration s")
// }
// }
// val location = locationProvider.lastKnownOrRequestLocationUpdates(locationRequester, 20_000L)
// if (location != null) {
// Timber.d("Using last known location")
// }
//
// // Printing time zone and user agent
// Timber.d("Timezone: ${Api.TIME_ZONE} useragent ${Api.USER_AGENT}")
}

Thread.setDefaultUncaughtExceptionHandler { thread, throwable ->
Timber.e(throwable, "Uncaught exception on thread ${thread.name}")
}

// Initiate the permanent background scan
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && SharedPrefs.usePermanentBluetoothScanner) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && Build.VERSION.SDK_INT <= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && SharedPrefs.usePermanentBluetoothScanner) {
PermanentBluetoothScanner.scan()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ interface BeaconDao {
@Query("SELECT * FROM beacon WHERE deviceAddress LIKE :deviceAddress ORDER BY receivedAt DESC")
fun getDeviceBeacons(deviceAddress: String): List<Beacon>

@Query("SELECT * FROM beacon WHERE deviceAddress LIKE :deviceAddress ORDER BY receivedAt DESC")
fun observeDeviceBeacons(deviceAddress: String): Flow<List<Beacon>>

@Query("SELECT * FROM beacon WHERE deviceAddress LIKE :deviceAddress AND receivedAt >= :since ORDER BY receivedAt DESC")
fun getDeviceBeaconsSince(deviceAddress: String, since: LocalDateTime): List<Beacon>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,7 @@ interface DeviceDao {

@Query("SELECT * FROM device WHERE deviceType = :deviceType AND lastSeen >= :since AND connectable = :connectableState LIMIT 1")
fun getDeviceWithConnectableStateSince(deviceType: String, since: LocalDateTime, connectableState: Boolean): BaseDevice?

@Query("SELECT * FROM device WHERE address LIKE :address LIMIT 1")
fun observeByAddress(address: String): Flow<BaseDevice?>
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import de.seemoo.at_tracking_detection.database.models.device.types.SamsungTrack
import de.seemoo.at_tracking_detection.database.models.device.types.SamsungTrackerType
import de.seemoo.at_tracking_detection.database.models.device.types.Tile
import de.seemoo.at_tracking_detection.database.models.device.types.Unknown
import de.seemoo.at_tracking_detection.ui.scan.ScanFragment
import de.seemoo.at_tracking_detection.ui.scan.ScanResultWrapper
import de.seemoo.at_tracking_detection.util.Utility
import de.seemoo.at_tracking_detection.util.converter.DateTimeConverter
Expand Down Expand Up @@ -129,8 +130,14 @@ data class BaseDevice(
} else if (deviceType == DeviceType.GOOGLE_FIND_MY_NETWORK && subDeviceType != "UNKNOWN") {
val subType = GoogleFindMyNetworkType.stringToSubType(subDeviceType)
AppCompatResources.getDrawable(ATTrackingDetectionApplication.getAppContext(), GoogleFindMyNetworkType.drawableForSubType(subType, name))
}
else {
} else if (ScanFragment.samsungSubDeviceTypeMap.containsKey(uniqueId)) {
val subType = ScanFragment.samsungSubDeviceTypeMap[uniqueId]!!
AppCompatResources.getDrawable(ATTrackingDetectionApplication.getAppContext(), SamsungTrackerType.drawableForSubType(subType))
} else if (ScanFragment.googleSubDeviceTypeMap.containsKey(uniqueId)) {
val subType = ScanFragment.googleSubDeviceTypeMap[uniqueId]!!
val deviceNameFromCache = ScanFragment.deviceNameMap[uniqueId]
AppCompatResources.getDrawable(ATTrackingDetectionApplication.getAppContext(), GoogleFindMyNetworkType.drawableForSubType(subType, deviceNameFromCache))
} else {
device.getDrawable()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package de.seemoo.at_tracking_detection.database.models.device

import de.seemoo.at_tracking_detection.R
import de.seemoo.at_tracking_detection.database.models.device.types.*
import de.seemoo.at_tracking_detection.ui.scan.ScanFragment
import de.seemoo.at_tracking_detection.ui.scan.ScanResultWrapper
import de.seemoo.at_tracking_detection.util.SharedPrefs

Expand Down Expand Up @@ -35,23 +36,6 @@ enum class DeviceType {
}
}

fun userReadableName(wrappedScanResult: ScanResultWrapper): String {
val deviceType: DeviceType = wrappedScanResult.deviceType
return when (deviceType) {
UNKNOWN -> Unknown.defaultDeviceName
AIRPODS -> AirPods.defaultDeviceName
AIRTAG -> AirTag.defaultDeviceName
APPLE -> AppleDevice.defaultDeviceName
FIND_MY -> AppleFindMy.defaultDeviceName
TILE -> Tile.defaultDeviceName
CHIPOLO -> Chipolo.defaultDeviceName
PEBBLEBEE -> PebbleBee.defaultDeviceName
SAMSUNG_TRACKER -> SamsungTracker.defaultDeviceName
SAMSUNG_FIND_MY_MOBILE -> SamsungFindMyMobile.defaultDeviceName
GOOGLE_FIND_MY_NETWORK -> GoogleFindMyNetwork.defaultDeviceName
}
}

fun getImageDrawable(wrappedScanResult: ScanResultWrapper): Int {
val deviceType: DeviceType = wrappedScanResult.deviceType
return when (deviceType) {
Expand All @@ -63,9 +47,28 @@ enum class DeviceType {
TILE -> R.drawable.ic_tile
CHIPOLO -> R.drawable.ic_chipolo
PEBBLEBEE -> R.drawable.ic_pebblebee_clip
SAMSUNG_TRACKER -> R.drawable.ic_smarttag_icon
SAMSUNG_TRACKER -> getSamsungDrawable(wrappedScanResult)
SAMSUNG_FIND_MY_MOBILE -> R.drawable.ic_baseline_device_unknown_24
GOOGLE_FIND_MY_NETWORK -> R.drawable.ic_chipolo
GOOGLE_FIND_MY_NETWORK -> getGoogleDrawable(wrappedScanResult)
}
}

private fun getSamsungDrawable(wrappedScanResult: ScanResultWrapper): Int {
return if (ScanFragment.samsungSubDeviceTypeMap.containsKey(wrappedScanResult.uniqueIdentifier)) {
val subType = ScanFragment.samsungSubDeviceTypeMap[wrappedScanResult.uniqueIdentifier]!!
SamsungTrackerType.drawableForSubType(subType)
} else {
R.drawable.ic_smarttag_icon
}
}

private fun getGoogleDrawable(wrappedScanResult: ScanResultWrapper): Int {
return if (ScanFragment.googleSubDeviceTypeMap.containsKey(wrappedScanResult.uniqueIdentifier)) {
val subType = ScanFragment.googleSubDeviceTypeMap[wrappedScanResult.uniqueIdentifier]!!
val deviceNameFromCache = ScanFragment.deviceNameMap[wrappedScanResult.uniqueIdentifier]
GoogleFindMyNetworkType.drawableForSubType(subType, deviceNameFromCache)
} else {
R.drawable.ic_chipolo
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class BeaconRepository @Inject constructor(
fun getDeviceBeacons(deviceAddress: String): List<Beacon> =
beaconDao.getDeviceBeacons(deviceAddress)

fun getDeviceBeaconsFlow(deviceAddress: String): Flow<List<Beacon>> =
beaconDao.observeDeviceBeacons(deviceAddress)

fun getDeviceBeaconsSince(deviceAddress: String, since: LocalDateTime): List<Beacon> =
beaconDao.getDeviceBeaconsSince(deviceAddress, since)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class DeviceRepository @Inject constructor(private val deviceDao: DeviceDao) {

fun getDevice(deviceAddress: String): BaseDevice? = deviceDao.getByAddress(deviceAddress)

fun observeDevice(deviceAddress: String): Flow<BaseDevice?> = deviceDao.observeByAddress(deviceAddress)

val countNotTracking = deviceDao.getCountNotTracking(RiskLevelEvaluator.relevantTrackingDateForRiskCalculation)

val countIgnored = deviceDao.getCountIgnored()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import android.os.Build
import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import androidx.core.content.ContextCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.fragment.app.Fragment
import com.github.appintro.AppIntro
import com.github.appintro.AppIntroFragment
Expand Down Expand Up @@ -37,6 +39,15 @@ class OnboardingActivity : AppIntro() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

MainActivity.configureSystemBars(this, edgeToEdge = true, applyRootPadding = true)

try {
WindowCompat.getInsetsController(window, window.decorView).show(WindowInsetsCompat.Type.systemBars())
} catch (e: Exception) {
Timber.w(e, "Failed to disable immersive mode or show system bars")
}

permission = intent.getStringExtra("permission")
Timber.d("Onboarding started with: $permission")
if (permission != null) {
Expand All @@ -52,6 +63,15 @@ class OnboardingActivity : AppIntro() {
}
}

override fun onResume() {
super.onResume()
try {
WindowCompat.getInsetsController(window, window.decorView).show(WindowInsetsCompat.Type.systemBars())
} catch (e: Exception) {
Timber.w(e, "Failed to disable immersive mode or show system bars in onResume")
}
}

override fun onDonePressed(currentFragment: Fragment?) {
//Checks which permissions have given to store the default value for location access
val locationPermissionState =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ class DashboardRiskFragment : Fragment() {
private var _binding: FragmentDashboardRiskBinding? = null
private val binding get() = _binding!!

@Inject
lateinit var reviewController: ReviewController
// Google Play Review Controller: Only active in Google Play builds
// @Inject
// lateinit var reviewController: ReviewController

override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
Expand All @@ -62,8 +63,9 @@ class DashboardRiskFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

// Google Play Review Controller: Only active in Google Play builds
// Increment app open count
reviewController.incrementAppOpenCount()
// reviewController.incrementAppOpenCount()

val riskCard: MaterialCardView = view.findViewById(R.id.risk_card)
riskCard.setOnClickListener {
Expand Down Expand Up @@ -204,19 +206,21 @@ class DashboardRiskFragment : Fragment() {
}
}

// Google Play Review Controller: Only active in Google Play builds
// Check if we should show review after data is loaded
checkAndShowReview()
// checkAndShowReview()
}

private fun checkAndShowReview() {
Timber.d("Checking if review should be shown")
if (BuildConfig.DEBUG) {
reviewController.debugReviewStatus()
}
reviewController.requestReviewDialog(requireActivity()) {
Timber.d("Review dialog request completed")
}
}
// Google Play Review Controller: Only active in Google Play builds
// private fun checkAndShowReview() {
// Timber.d("Checking if review should be shown")
// if (BuildConfig.DEBUG) {
// reviewController.debugReviewStatus()
// }
// reviewController.requestReviewDialog(requireActivity()) {
// Timber.d("Review dialog request completed")
// }
// }

override fun onStart() {
super.onStart()
Expand Down
Loading
Loading