- Add notification channel creation in TimeSafariApplication for Android 8.0+
Required for daily notifications to display properly. Channel ID matches
plugin's 'timesafari.daily' channel.
- Convert localhost to 10.0.2.2 in CapacitorPlatformService for Android emulators
Android emulators cannot reach localhost - they need 10.0.2.2 to access
the host machine's API server.
- Refresh native fetcher configuration when API server changes in AccountViewView
Ensures background notification prefetch uses the updated endpoint when
user changes API server URL in settings.
- Add directive for fixing notification dismiss cancellation in plugin
Documents the fix needed in plugin source to cancel notification from
NotificationManager when dismiss button is clicked.
These changes ensure daily notifications work correctly on Android, including
proper channel setup, emulator network connectivity, and configuration refresh.
Add comprehensive instrumentation to diagnose why native fetcher
is not being called during prefetch operations.
Instrumentation Added:
- TimeSafariApplication: Log app initialization, fetcher registration,
and verification with process ID and timestamps
- TimeSafariNativeFetcher: Log configuration, fetch start, source
resolution (native vs fallback), and write completion
- Diagnostic script: Filter logcat for prefetch-related events
- Investigation summary: Document root cause hypotheses and
diagnostic checklist
Log Tags:
- APP|ON_CREATE: App initialization timing and process info
- FETCHER|REGISTER_START/REGISTERED: Fetcher registration lifecycle
- FETCHER|CONFIGURE_START/CONFIGURE_COMPLETE: Configuration tracking
- PREFETCH|START/SOURCE/WRITE_OK: Prefetch operation tracking
- DISPLAY|START/LOOKUP: Display worker tracking (future)
- STORAGE|POST_PREFETCH/PRE_DISPLAY: Storage verification (future)
This instrumentation will help diagnose:
1. Registration timing issues (worker before onCreate)
2. Fetcher resolution failures (null fetcher)
3. Process mismatches (multi-process issues)
4. ID schema inconsistencies (prefetch vs display)
5. Storage persistence issues (content not saved)
Author: Matthew Raymer
Implement Android host-side integration for daily notification plugin
by creating custom Application class and native content fetcher.
Changes:
- Add TimeSafariApplication.java: Custom Application class that registers
NativeNotificationContentFetcher with the plugin on app startup
- Add TimeSafariNativeFetcher.java: Implementation of NativeNotificationContentFetcher
interface that fetches notification content from endorser API endpoint
(/api/v2/report/plansLastUpdatedBetween) using JWT authentication
- Update AndroidManifest.xml: Declare TimeSafariApplication as the custom
Application class using android:name attribute
- Add Gson dependency: Include com.google.code.gson:gson:2.10.1 in build.gradle
for JSON parsing in the native fetcher
This setup mirrors the test app configuration and enables the plugin's
background content prefetching feature. The native fetcher will be called
by the plugin 5 minutes before scheduled notification times to prefetch
content for display.
Author: Matthew Raymer
- Add notification methods to PlatformService interface
- Implement notification support in CapacitorPlatformService with plugin integration
- Add stub implementations in WebPlatformService and ElectronPlatformService
- Add nativeNotificationTime, nativeNotificationTitle, and nativeNotificationMessage fields to Settings interface
- Create DailyNotificationSection component for AccountViewView integration
- Add Android manifest permissions (POST_NOTIFICATIONS, SCHEDULE_EXACT_ALARM, RECEIVE_BOOT_COMPLETED)
- Register daily-notification-plugin in capacitor.plugins.json
- Integrate DailyNotificationSection into AccountViewView
Features:
- Platform capability detection (hides on unsupported platforms)
- Permission request flow with fallback to settings
- Schedule/cancel notifications
- Time editing with HTML5 time input
- Settings persistence
- Plugin state synchronization on app load
NOTE: Currently storing notification schedule in SQLite database, but plugin
was designed to store schedule internally. Consider migrating to plugin's
internal storage to avoid database initialization issues.
- Add @capacitor/status-bar dependency for safe area detection
- Implement SafeAreaPlugin for Android with proper inset calculation
- Create safeAreaInset.js utility for CSS custom property injection
- Update Android manifest and build configuration for plugin
- Integrate safe area handling across Vue components and views
- Update iOS Podfile and Android gradle configurations
- Add commitlint and husky for commit message validation
Technical changes:
- SafeAreaPlugin uses WindowInsets API for Android R+ devices
- Fallback detection for navigation bar and gesture bar heights
- CSS custom properties: --safe-area-inset-{top,bottom,left,right}
- Platform-specific detection (Android WebView only)
- StatusBar plugin integration for top inset calculation
- Update com.android.tools.build:gradle dependency to latest patch version
- Addresses Android Studio update prompt for build tool security
- Minor version bump for stability and bug fixes
Keeps Android build tools current and secure
Android build was failing due to missing drawable and mipmap directories
for splash screens and launcher icons. iOS was missing complete asset
catalog structure for app icons and splash screens.
- Create missing Android resource directories (drawable, mipmap-*)
- Add splash screen files to Android drawable directory
- Generate complete set of Android launcher icons
- Create iOS asset catalog structure with proper Contents.json files
- Generate 21 iOS assets (app icons + splash screens) using ImageMagick
- Add resource validation scripts for both platforms
- Enhance Android resource check to auto-create missing directories
NOTE: you need to test this from a fresh clone and after an npm install!
Android build now completes successfully. iOS assets ready for macOS/Xcode
builds. Both platforms have complete resource sets for development.
Update Android SDK configuration to target API 36 (Android 16):
- Update compileSdkVersion and targetSdkVersion from 35 to 36
- Update suppressUnsupportedCompileSdk from 34 to 36
- Maintains minSdkVersion at 22 for broad device compatibility
- Verified build system compatibility with Gradle 8.13
- Move Android-specific API server logic from common.sh to build-android.sh
- Remove unnecessary ANDROID_BUILD environment variable
- Set localhost:3000 as default in common.sh for all Capacitor builds
- Override to 10.0.2.2:3000 specifically in build-android.sh for Android development
- Fix execution order issue where common.sh ran before ANDROID_BUILD was set
- Maintain proper separation: Android emulator uses 10.0.2.2, iOS simulator uses localhost
Remove duplicate APP_SERVER imports in ContactsView.vue and ClaimView.vue that were causing compilation errors during testing. The duplicate imports occurred when both files had APP_SERVER imported from constants/app and also assigned as class properties.
- ContactsView.vue: Remove duplicate import, keep class property assignment
- ClaimView.vue: Remove duplicate import, keep class property assignment
- Fixes Vite compilation errors that were blocking test execution
- 33/38 tests now pass successfully
This resolves the "Identifier 'APP_SERVER' has already been declared" errors that were preventing the development server from running properly.
- Add capacitor-assets.config.json for cross-platform asset generation
- Create resources/ directory structure for source assets
- Update .gitignore to exclude generated Android assets and resources
- Remove 30+ generated files from source control
- Add comprehensive asset management documentation
- Verify asset generation works with new configuration
Assets are now properly managed: source files in version control,
generated files excluded, and build process handles platform-specific
asset generation automatically.
- Add capacitor-assets.config.json for cross-platform asset generation
- Create resources/ directory structure for source assets
- Update .gitignore to exclude generated Android assets and resources
- Remove 30+ generated files from source control
- Add comprehensive asset management documentation
- Verify asset generation works with new configuration
Assets are now properly managed: source files in version control,
generated files excluded, and build process handles platform-specific
asset generation automatically.
- Implement worker-only database access to eliminate double migrations
- Add parameter serialization in usePlatformService to prevent Capacitor "object could not be cloned" errors
- Fix infinite logging loop with circuit breaker in databaseUtil
- Use dynamic imports in WebPlatformService to prevent worker thread errors
- Add higher-level database methods (getContacts, getSettings) to composable
- Eliminate Vue Proxy objects through JSON serialization and Object.freeze protection
Resolves Proxy(Array) serialization failures and worker context conflicts across Web/Capacitor/Electron platforms.
- Implement worker-only database access to eliminate double migrations
- Add parameter serialization in usePlatformService to prevent Capacitor "object could not be cloned" errors
- Fix infinite logging loop with circuit breaker in databaseUtil
- Use dynamic imports in WebPlatformService to prevent worker thread errors
- Add higher-level database methods (getContacts, getSettings) to composable
- Eliminate Vue Proxy objects through JSON serialization and Object.freeze protection
Resolves Proxy(Array) serialization failures and worker context conflicts across Web/Capacitor/Electron platforms.
- Change Android Gradle Plugin from 8.10.1 to 8.9.1
- Resolves compatibility issue with Android Studio
- Maintains compatibility with Gradle 8.11.1 wrapper
Author: Matthew Raymer
SECURITY AUDIT CHECKLIST:
- [x] No security implications from AGP version change
- [x] Version downgrade is to stable, supported version
- [x] Build process remains secure and functional
- Change Android Gradle Plugin from 8.10.1 to 8.9.1
- Resolves compatibility issue with Android Studio
- Maintains compatibility with Gradle 8.11.1 wrapper
Author: Matthew Raymer
SECURITY AUDIT CHECKLIST:
- [x] No security implications from AGP version change
- [x] Version downgrade is to stable, supported version
- [x] Build process remains secure and functional
- Enhanced migration service to handle duplicate column errors gracefully
- Added detection for 'duplicate column' and 'already exists' errors
- Migration service now marks partially applied migrations as complete
- Prevents Electron app crashes due to cross-platform database conflicts
- Improved robustness for database schema migrations
Fixes database initialization issues when switching between platforms
(web, mobile, electron) that may have different migration states.
- Enhanced migration service to handle duplicate column errors gracefully
- Added detection for 'duplicate column' and 'already exists' errors
- Migration service now marks partially applied migrations as complete
- Prevents Electron app crashes due to cross-platform database conflicts
- Improved robustness for database schema migrations
Fixes database initialization issues when switching between platforms
(web, mobile, electron) that may have different migration states.