Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,18 @@ dependencies {
ksp 'androidx.room:room-compiler:2.7.2'
implementation 'androidx.paging:paging-runtime:3.3.6'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

// HTTP webhook delivery (offline-resilient via WorkManager constraints + backoff).
implementation 'androidx.work:work-runtime-ktx:2.10.0'

testImplementation 'org.robolectric:robolectric:4.14.1'
testImplementation 'androidx.test.ext:junit:1.2.1'
testImplementation 'androidx.test:core:1.6.1'
testImplementation 'androidx.work:work-testing:2.10.0'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.1'

androidTestImplementation 'androidx.work:work-testing:2.10.0'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
}
298 changes: 298 additions & 0 deletions app/schemas/de.jl.notificationlog.data.AppDatabase/7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
{
"formatVersion": 1,
"database": {
"version": 7,
"identityHash": "7dd2b4e5b630d7ec6722adf02f8bbb9f",
"entities": [
{
"tableName": "notifications",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `package` TEXT NOT NULL, `time` INTEGER NOT NULL, `title` TEXT NOT NULL, `text` TEXT NOT NULL, `progress` INTEGER NOT NULL, `progress_max` INTEGER NOT NULL, `progress_indeterminate` INTEGER NOT NULL, `is_oldest_version` INTEGER NOT NULL, `is_newest_version` INTEGER NOT NULL, `duplicate_group_id` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "packageName",
"columnName": "package",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "time",
"columnName": "time",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "text",
"columnName": "text",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "progress",
"columnName": "progress",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "progressMax",
"columnName": "progress_max",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "progressIndeterminate",
"columnName": "progress_indeterminate",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isOldestVersion",
"columnName": "is_oldest_version",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isNewestVersion",
"columnName": "is_newest_version",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "duplicateGroupId",
"columnName": "duplicate_group_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "notifications_index_time",
"unique": false,
"columnNames": [
"time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `notifications_index_time` ON `${TABLE_NAME}` (`time`)"
},
{
"name": "notifications_index_app_and_time",
"unique": false,
"columnNames": [
"package",
"time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `notifications_index_app_and_time` ON `${TABLE_NAME}` (`package`, `time`)"
},
{
"name": "notifications_oldest_index_time",
"unique": false,
"columnNames": [
"is_oldest_version",
"time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `notifications_oldest_index_time` ON `${TABLE_NAME}` (`is_oldest_version`, `time`)"
},
{
"name": "notifications_oldest_index_app_and_time",
"unique": false,
"columnNames": [
"is_oldest_version",
"package",
"time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `notifications_oldest_index_app_and_time` ON `${TABLE_NAME}` (`is_oldest_version`, `package`, `time`)"
},
{
"name": "notifications_newest_index_time",
"unique": false,
"columnNames": [
"is_newest_version",
"time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `notifications_newest_index_time` ON `${TABLE_NAME}` (`is_newest_version`, `time`)"
},
{
"name": "notifications_newest_index_app_and_time",
"unique": false,
"columnNames": [
"is_newest_version",
"package",
"time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `notifications_newest_index_app_and_time` ON `${TABLE_NAME}` (`is_newest_version`, `package`, `time`)"
},
{
"name": "notifications_index_duplicate_group",
"unique": false,
"columnNames": [
"duplicate_group_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `notifications_index_duplicate_group` ON `${TABLE_NAME}` (`duplicate_group_id`)"
},
{
"name": "notifications_index_app_duplicate_group",
"unique": false,
"columnNames": [
"package",
"duplicate_group_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `notifications_index_app_duplicate_group` ON `${TABLE_NAME}` (`package`, `duplicate_group_id`)"
}
]
},
{
"tableName": "active_notifications",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `app_package_name` TEXT NOT NULL, `system_id` INTEGER NOT NULL, `system_tag` TEXT NOT NULL, `previous_notification_item_id` INTEGER NOT NULL, FOREIGN KEY(`previous_notification_item_id`) REFERENCES `notifications`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "appPackageName",
"columnName": "app_package_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "systemId",
"columnName": "system_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "systemTag",
"columnName": "system_tag",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "previousNotificationItemId",
"columnName": "previous_notification_item_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "active_notifications_query_index",
"unique": true,
"columnNames": [
"app_package_name",
"system_id",
"system_tag"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `active_notifications_query_index` ON `${TABLE_NAME}` (`app_package_name`, `system_id`, `system_tag`)"
},
{
"name": "active_notification_previous_notification_item_index",
"unique": true,
"columnNames": [
"previous_notification_item_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `active_notification_previous_notification_item_index` ON `${TABLE_NAME}` (`previous_notification_item_id`)"
}
],
"foreignKeys": [
{
"table": "notifications",
"onDelete": "CASCADE",
"onUpdate": "CASCADE",
"columns": [
"previous_notification_item_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "pending_webhook_deliveries",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `notification_id` INTEGER NOT NULL, FOREIGN KEY(`notification_id`) REFERENCES `notifications`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationId",
"columnName": "notification_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "pending_webhook_deliveries_index_notification_id",
"unique": false,
"columnNames": [
"notification_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `pending_webhook_deliveries_index_notification_id` ON `${TABLE_NAME}` (`notification_id`)"
}
],
"foreignKeys": [
{
"table": "notifications",
"onDelete": "CASCADE",
"onUpdate": "CASCADE",
"columns": [
"notification_id"
],
"referencedColumns": [
"id"
]
}
]
}
],
"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, '7dd2b4e5b630d7ec6722adf02f8bbb9f')"
]
}
}
Loading