Skip to content

Commit

Permalink
Merge pull request #58 from seemoo-lab/tile_device
Browse files Browse the repository at this point in the history
Tile suppport & Bug fixes
  • Loading branch information
Sn0wfreezeDev authored Mar 28, 2022
2 parents 1c98d57 + 17982db commit e8d2184
Show file tree
Hide file tree
Showing 33 changed files with 1,298 additions and 111 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="XcEJDaf0.iGWKpSJUiGN7z2Z7a0aAJkhUBJSYN9xP"
API_KEY="R8ZwC7u3.3TkBKfHkHhS590nO6VlbtOG5RLTbO0r5"
API_BASE_ADDRESS="https://tpe.seemoo.tu-darmstadt.de/api/"
16 changes: 13 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ android {
applicationId "de.seemoo.at_tracking_detection"
minSdkVersion 21
targetSdkVersion 31
versionCode 23
versionName "1.2"
versionCode 29
versionName "1.3.2"

buildConfigField "String", "API_KEY", apiProperties["API_KEY"]
buildConfigField "String", "API_BASE_ADDRESS", apiProperties["API_BASE_ADDRESS"]
Expand Down Expand Up @@ -61,6 +61,13 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}

sourceSets {
// Adds exported schema location as test app assets.
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
// androidTest.assets.srcDirs += files("/Users/seemoo/Work/Research/AirGuard/airguard-app/app/schemas/de.seemoo.at_tracking_detection.database.AppDatabase".toString())
}

}

aboutLibraries {
Expand All @@ -75,7 +82,7 @@ dependencies {
implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0-alpha03'
implementation 'com.google.android.material:material:1.6.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.1'
Expand Down Expand Up @@ -115,6 +122,9 @@ dependencies {

androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.room:room-testing:2.4.2"

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
{
"formatVersion": 1,
"database": {
"version": 5,
"identityHash": "b3de17964491408ab3b601a6554975de",
"entities": [
{
"tableName": "device",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`deviceId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `uniqueId` TEXT, `address` TEXT NOT NULL, `name` TEXT, `ignore` INTEGER NOT NULL, `connectable` INTEGER DEFAULT 0, `payloadData` INTEGER, `firstDiscovery` TEXT NOT NULL, `lastSeen` TEXT NOT NULL, `notificationSent` INTEGER NOT NULL, `lastNotificationSent` TEXT, `deviceType` TEXT DEFAULT null)",
"fields": [
{
"fieldPath": "deviceId",
"columnName": "deviceId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "uniqueId",
"columnName": "uniqueId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "ignore",
"columnName": "ignore",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "connectable",
"columnName": "connectable",
"affinity": "INTEGER",
"notNull": false,
"defaultValue": "0"
},
{
"fieldPath": "payloadData",
"columnName": "payloadData",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "firstDiscovery",
"columnName": "firstDiscovery",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastSeen",
"columnName": "lastSeen",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "notificationSent",
"columnName": "notificationSent",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastNotificationSent",
"columnName": "lastNotificationSent",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "deviceType",
"columnName": "deviceType",
"affinity": "TEXT",
"notNull": false,
"defaultValue": "null"
}
],
"primaryKey": {
"columnNames": [
"deviceId"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_device_address",
"unique": true,
"columnNames": [
"address"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_device_address` ON `${TABLE_NAME}` (`address`)"
}
],
"foreignKeys": []
},
{
"tableName": "notification",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`notificationId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `deviceAddress` TEXT NOT NULL, `falseAlarm` INTEGER NOT NULL, `dismissed` INTEGER, `clicked` INTEGER, `createdAt` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "notificationId",
"columnName": "notificationId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "deviceAddress",
"columnName": "deviceAddress",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "falseAlarm",
"columnName": "falseAlarm",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "dismissed",
"columnName": "dismissed",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "clicked",
"columnName": "clicked",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "createdAt",
"columnName": "createdAt",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"notificationId"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "beacon",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`beaconId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `receivedAt` TEXT NOT NULL, `rssi` INTEGER NOT NULL, `deviceAddress` TEXT NOT NULL, `longitude` REAL, `latitude` REAL, `mfg` BLOB, `serviceUUIDs` TEXT)",
"fields": [
{
"fieldPath": "beaconId",
"columnName": "beaconId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "receivedAt",
"columnName": "receivedAt",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "rssi",
"columnName": "rssi",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "deviceAddress",
"columnName": "deviceAddress",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "longitude",
"columnName": "longitude",
"affinity": "REAL",
"notNull": false
},
{
"fieldPath": "latitude",
"columnName": "latitude",
"affinity": "REAL",
"notNull": false
},
{
"fieldPath": "manufacturerData",
"columnName": "mfg",
"affinity": "BLOB",
"notNull": false
},
{
"fieldPath": "serviceUUIDs",
"columnName": "serviceUUIDs",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"columnNames": [
"beaconId"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "feedback",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`feedbackId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `notificationId` INTEGER NOT NULL, `location` TEXT)",
"fields": [
{
"fieldPath": "feedbackId",
"columnName": "feedbackId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationId",
"columnName": "notificationId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "location",
"columnName": "location",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"columnNames": [
"feedbackId"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'b3de17964491408ab3b601a6554975de')"
]
}
}
Loading

0 comments on commit e8d2184

Please sign in to comment.