feat(android): implement Phase 1.1 SQLite database sharing with WAL mode

- Add DailyNotificationDatabase.java with three-table schema and WAL configuration
- Add DailyNotificationMigration.java for SharedPreferences to SQLite migration
- Add DailyNotificationDatabaseTest.java with comprehensive unit tests
- Add ConfigureOptions interface with dbPath, storage mode, and TTL settings
- Add configure() method to DailyNotificationPlugin interface
- Update Android plugin with SQLite integration and automatic migration
- Update web implementations to implement new configure() method
- Add phase1-sqlite-usage.ts example demonstrating shared storage configuration

This implements the critical Phase 1.1 gate for shared SQLite storage:
- App and plugin can open the same SQLite file with WAL mode
- Automatic migration from SharedPreferences preserves existing data
- Schema version checking prevents compatibility issues
- Concurrent reads during background writes enabled
- Configuration API supports both shared and tiered storage modes

Files: 8 changed, 1204 insertions(+)
This commit is contained in:
Matthew Raymer
2025-09-08 09:49:08 +00:00
parent 3a181632d1
commit 489dd4ac28
8 changed files with 1204 additions and 0 deletions

View File

@@ -19,6 +19,11 @@ export class DailyNotificationWeb implements DailyNotificationPlugin {
};
private scheduledNotifications: Set<string> = new Set();
async configure(_options: any): Promise<void> {
// Web implementation placeholder
console.log('Configure called on web platform');
}
/**
* Schedule a daily notification
*/