Skip to content

Commit

Permalink
AirGuard Version 2.2 (#175)
Browse files Browse the repository at this point in the history
* improve LocationProvider, can handle COARSE_LOCATION, works with any Location Provider, improve readability and efficiency

* small improvements to map rendering

* make ObserveTracker functionality visible again

* improve Observation Screen Design

* ObserveTrackerWorker now calls ScanBluetoothWorker manually before checking Observation criteria. Clarify explanation how Observe Tracker works.

* update gradle version

* improve Background Worker Scheduling, add Error Case for ObserveTracker

* add handling for inconsistent database entries in ObserveTracker, make changing ID Text only visible when the device can change the id

* Tracker Observation can now be stopped, added visual indicator whether device is already being observed

* add Article Fragment

* fix crash in Play Sound Dialog

* add navigation to article

* Adding new API endpoint that deletes study data for a specific user

* Setting request to DELETE method

* implement Data Deletion in UI

* fix api initialization bug, better initialization of api token, add explanation text to data deletion, data deletion leads to automatic study opt out

* add first implementation of Online Article Download

* add additional information in JSON

* Article Download now Coroutine, loading animation while downloading JSON, remove old code

* Design improvement

* Article offline handling

* support Online Articles in multiple languages

* upgrade to gradle 8.1.3

* fix security issues in the AndroidManifest

* update backup rules to confirm to android 12 standards

* optimize Article Offline Handling and add old cards again

* upgrade gradle and some libraries

* speed up map rendering and add permission necessary for Android 14

* Rename SmartTags to be consistent with Samsungs current product lines

* fix for common IllegalStateException in PlaySoundDialogFragment

* add previewImage to the Article Function

* Fix for Delete Study Data

* Relevant Tracking Days can be set inividually for each Type of tracker, set for 2 Days for Chipolo and Tile

* upgrade gradle to 8.2.0

* upgrade to Android 14 / SDK 34

* fix Crash when clicking on Scan Element

* optimize BluetoothReceiver for Android 13 or higher

* upgrade some plugins and dependencies

* UI improvements: Manual Scan now more user friendly, more explanation, less technical terms

* adjust articles for in production Server files

* number of Locations can be set individually for each tracker, in default number of Locations is now depending on detection sensitivity

* remove own location on map

* NumberofLocations override can now be overwritten for every RiskLevel

* separate the connected / low Risk devices from the offline / high risk devices in manual scan. Remove settings to toggle between scan type

* separated ScanView is now a NestedScrollView

* Manual Scan Behaviour now resembles the one from the iOS App

* replace some of the deprecated Java Functions with backwards compatible replacements

* upgrade gradle to 8.2.1

* Scanning behaviour of Tile Tracker now closer to iOS Version

* Device Detail Page now vertical, similar to iOS Design

* add Website Link to Tracker Detail Page

* Update deprecated Code

* change relevant days to relevant hours

* Fixed an issue where the versionProvider was removed in the LocationProvidern

* Update 2.1 for F-Droid

* 2.0 F-Droid Release version

* Fix Google Play badge in README.md

The old endpoint is longer maintained and project archived:
- https://github.com/cvzi/playshields

The alternative made by the same author can simply replace the old one:
- https://github.com/cvzi/play

* Working on fixing SendStatisticsWorker

* Changing proguard rules

This fixes a bug caused by proguard, which would let any network connections fail.

* Reducing duplicate devices uploads

* F-Droid 2.1.1 Release

* Updating F-Droid Metadata

* Rebasing Main onto current branch

* ObserveTrackerWorker now calls ScanBluetoothWorker manually before checking Observation criteria. Clarify explanation how Observe Tracker works.

* Updating version in Manifest
Updating Tests to run with new LocationProvider changes

* some optimizations to the processing of manual scan items

* some more optimizations to the processing of manual scan items, Device Detection with more error checks, temporarily remove Sorting Options for Manual Scan

* A New notification for a device will only be sent if the device meets all the criteria for a notification again only considering events after the last notification.

* upgrade Gradle and some dependecies

* upgrade Kotlin Version to 1.9.22, more dependencies, migrate some functions to be compatible with new kotlin version

* reintroduce Scan Sorting again

* Detail Scan now shows correct Time since Tracker is in offline Mode

* add Legend to map

* upgrade some dependencies

* upgrade some dependencies, modify dependency structure

* hide Website URL Button if Website URL could not be determined

* fix bug in sorting of manual scan, fix bug in article rendering in dashboard

* adjust RiskLevel Numbers so they are consistent with the iOS Version

* use separate Algorithm for Notifications and RiskLevel evaluation

* optimize and Bugfix RiskLevelEvaluator

* add feedback options other and not found. Add message success when submitting feedback.

* save sensitivity level for every notification, save connectionState for every new beacon

* devices that have not been seen in the last 30 days and beacons older than 30 days, both without a notification will get deleted

* improve connectionState for chipolo devices

* safe all devices no matter in what connectionState. Hide safe trackers in ui, so that visible behaviour stays the same.

* log when and how many devices are getting deleted, small optimizations in deleting process

* upgrade gradle to 8.3.0 and upgrade some dependencies

* remove Battery from Distance Scan

remove Sorting Options from Manual Scan

remove Potential Trackers Label from Manual Scan

* Show No trackers found since installation date, instead of last 14 days

* fix string showing wrong device type in feedback View

* Redesign Feedback, Fix Crashes in Feedback

* make Feedback Button more visible, also improve some padding

* add explanation text to device view that explains that some devices change their key

* add explanation for safe trackers in manual scan

* ignored trackers will be treated as safe trackers in manual scan

* add Advanced Mode, that hides complicated to understand options and menus

* when deleting old devices and beacons, locations that are not used anymore also get deleted

* add Clustering to the map

* highly optimize speed in loading map markers, update some dependencies

* fix bug where numbers of locations being displayed were inconsistent

* fix bug where map markers where not displayed correctly in TrackingFragment

* automatic adjustments to the code

* fix a bug where markers were not displayed correctly when accessed via a notification

* optimize retrieval of markers from the database

* Moving background scans to be scheduled by AlarmManager instead of background workers.
- All Background Scans are now perform by the BackgroundBluetoothScanner
- The ScanBluetoothWorker stays functional
- Tracking Detection is still performed by a worker

* Fixing map marker display issue:
- On the TrackingFragment the map now shows the markers as expected.

* fix merge conflict

* add indices to Beacon and BaseDevice

* Checking permission for setExact Alarm
Using a wake lock on the BackgroundBluetoothScanner
Replacing Beacon count with times seen

* Fixing merge issues with git
Testing Background scans with Alarm

* upgrade gradle to 8.3.1, upgrade dependencies

* replace some Strings with Plurals

* fix crash when double tapping scan result

* add caching to deviceType retrieval and fix bug in old Beacon deletion

* manual scan keeps pause state while viewing scan items. Limit notifyDataSetChanged to at most once per second.

* device name can be edited from device detail view by clicking on the device name

* limit device name to 255 characters and one line, device name cannot be empty

* revert savedConnections only to for Tracking Detection relevant

* make corners of minimap rounded

* add (currently not visible) simpler design for device view

* altitude of each location now gets saved

* update existing locations if more recent and more accurate data is available

* upgrade gradle and some dependecies

* upgrade Kotlin Version

* do not save devices above an altitude of 9000 meters. This should avoid unnecessary detections on planes.

* don't create location object above 3000 meters, this is different to not creating a device object above 9000 meters from the previous commit

* upgrade gradle to 8.4.0

* fix bug where devices where not correctly put into safe and unsafe trackers

* make some string more understandable

* make padding of map more consistent

* massive speed up of manual scan, cleanup code

* replace ScanResult in manual scan with Wrapper Object. Massive Speed Improvements

* Setting minimum detection events to 3 on medium security mode.
Due to internal testing we found that this would lead to more reliable results

* Updating gradle and manifest

* Updating gradle and manifest

* Testing app without FOREGROUND_SERVICE
- Optimizing setAlarm for Android 14

* Rssi indicator image in manual scan updates if rssi value changes, update some dependencies

* optimize Repository Loading in manual scan

* further use of ScanResultWrapper in Backend. Put back Exact Alarm Permissions

* fix TypeToken Error on some devices by updating proguard rules

* add message in manual scan that Location Permission has to turned on

* handle case if wakeLock cannot be held

* upgrade gradle to 8.4.1.

* avoid unnecessary duplicate calls of getDeviceType

* low risk "secure tracker" explanation in manual scan is hidden if there are now low risk trackers

* Show Website URL also for Low Risk Devices

* Fix DeviceType Detection and Display of Explanation for it for unknown devices

* fix bug in ScanDistance

* fix bug in fetching deviceType from safe trackers

* fix compilation bug

* Adopting changes to set alarms more reliably

* Removing second launch icon

* Adding Scheduling alarms with new permission for Android 13 and Android 14

* F-Droid 2.2

---------

Co-authored-by: Dennis Arndt <darndt@seemoo.tu-darmstadt.de>
Co-authored-by: Peter Dave <hsu@peterdavehello.org>
  • Loading branch information
3 people authored Jun 11, 2024
1 parent 2b0e247 commit dd3e954
Show file tree
Hide file tree
Showing 148 changed files with 5,770 additions and 2,103 deletions.
2 changes: 1 addition & 1 deletion api.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
API_KEY="UCKgXwP.Dvmxyn1UygvnJfy2DV16OjbmHia4xXpd"
API_KEY="AGdk9qPF.Bl9yatnjjoy9WEEjXYGVewE7ZyJET9Yy"
API_BASE_ADDRESS="https://tpe.seemoo.tu-darmstadt.de/api/"
72 changes: 39 additions & 33 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ android {
viewBinding true
dataBinding true
compose true
buildConfig true
}

compileSdk = 34

defaultConfig {
applicationId "de.seemoo.at_tracking_detection"
minSdkVersion 28
targetSdkVersion 33
compileSdk 33
versionCode 39
versionName "2.1.1"

targetSdk = 34
versionCode 44
versionName "2.2"

buildConfigField "String", "API_KEY", apiProperties["API_KEY"]
buildConfigField "String", "API_BASE_ADDRESS", apiProperties["API_BASE_ADDRESS"]

Expand Down Expand Up @@ -64,7 +66,7 @@ android {
}

composeOptions {
kotlinCompilerExtensionVersion "1.4.8"
kotlinCompilerExtensionVersion "1.5.11"
}


Expand All @@ -91,79 +93,83 @@ dependencies {

implementation 'com.jakewharton.timber:timber:5.0.1'
implementation 'com.github.bastienpaulfr:Treessence:1.0.0'
implementation 'androidx.work:work-runtime-ktx:2.8.1'
implementation 'androidx.core:core-ktx:1.10.1'
implementation "androidx.work:work-runtime-ktx:$work_version"
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.6.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.6.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
implementation 'androidx.vectordrawable:vectordrawable:1.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.7'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'

implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.5'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.12'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.work:work-testing:2.8.1'
implementation 'androidx.core:core-ktx:1.10.1'
debugImplementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.5'
implementation "androidx.work:work-testing:$work_version"
implementation 'androidx.core:core-ktx:1.13.1'
debugImplementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.12'

implementation "com.google.dagger:hilt-android:$hilt_version"
implementation 'androidx.hilt:hilt-work:1.0.0'
implementation 'androidx.hilt:hilt-navigation-fragment:1.0.0'
implementation 'androidx.hilt:hilt-work:1.2.0'
implementation 'androidx.hilt:hilt-navigation-fragment:1.2.0'

implementation 'com.github.AppIntro:AppIntro:6.1.0'

implementation 'org.osmdroid:osmdroid-android:6.1.16'
implementation 'org.osmdroid:osmdroid-android:6.1.18'
implementation 'com.github.MKergall:osmbonuspack:6.9.0'

implementation 'com.github.ybq:Android-SpinKit:1.4.0'

implementation "com.mikepenz:aboutlibraries:$about_libraries_version"

implementation 'io.noties.markwon:core:4.6.2'
implementation 'com.github.mukeshsolanki:MarkdownView-Android:2.0.0'

implementation 'com.github.bumptech.glide:glide:4.16.0'


kapt "com.google.dagger:hilt-compiler:$hilt_version"
kapt 'androidx.hilt:hilt-compiler:1.0.0'
kapt 'androidx.hilt:hilt-compiler:1.2.0'

implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"

androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.room:room-testing:2.5.2'
androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3'
androidTestImplementation "androidx.room:room-testing:$room_version"
androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0'
androidTestImplementation 'androidx.test:core:1.5.0'
androidTestImplementation 'androidx.test:core-ktx:1.5.0'
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.5'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.5.1'

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

//Finds memory leaks while running the app in Debug mode
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'

//Compose
// Integration with activities
implementation 'androidx.activity:activity-compose:1.7.2'
implementation 'androidx.activity:activity-compose:1.9.0'
// Compose Material Design
implementation 'androidx.compose.material:material:1.4.3'
implementation 'androidx.compose.material:material:1.6.7'
// Animations
implementation 'androidx.compose.animation:animation:1.4.3'
implementation 'androidx.compose.animation:animation:1.6.7'
// Tooling support (Previews, etc.)
implementation 'androidx.compose.ui:ui-tooling:1.4.3'
implementation 'androidx.compose.ui:ui-tooling:1.6.7'
// Integration with ViewModels
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.8.0'
// UI Tests
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.4.3'
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.6.7'
// When using a MDC theme
implementation "com.google.android.material:compose-theme-adapter:1.2.1"

Expand Down
13 changes: 12 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,15 @@
# R8 full mode strips generic signatures from return types if not kept.
-keep,allowobfuscation,allowshrinking class retrofit2.Response

-keep class de.seemoo.at_tracking_detection.** { *; }
# Keep Gson classes
-keep class com.google.gson.reflect.TypeToken { *; }
-keep class com.google.gson.Gson { *; }
-keep class com.google.gson.TypeAdapter { *; }
-keep class com.google.gson.stream.JsonReader { *; }
-keep class com.google.gson.stream.JsonWriter { *; }

# Ensure that the classes related to Article are not stripped
-keep class de.seemoo.at_tracking_detection.ui.dashboard.Article { *; }

# Keep ProGuard/R8 from stripping out important methods or classes
-keep class * implements com.google.gson.reflect.TypeToken { *; }
Loading

0 comments on commit dd3e954

Please sign in to comment.