feat(android): implement Phase 2.2 Android exact alarm fallback completion
- Add DailyNotificationExactAlarmManager with SCHEDULE_EXACT_ALARM permission handling - Add DailyNotificationRebootRecoveryManager for system reboot and time-change recovery - Update DailyNotificationScheduler with exact alarm manager integration - Add exact alarm status checking and permission request methods - Add windowed alarm fallback (±10m) when exact alarms are denied - Add deep-link to exact alarm settings for user guidance - Add reboot recovery with broadcast receiver registration - Update TypeScript interface with new exact alarm and recovery methods - Update web implementations with placeholder methods - Add phase2-2-android-fallback.ts usage examples This completes Phase 2.2 Android fallback implementation: - Exact alarm permission handling with graceful fallback - Windowed alarm support (±10m) for battery optimization - Reboot and time-change recovery with broadcast receivers - Deep-link to exact alarm settings for user enablement - Integration with existing TTL enforcement and rolling window - Comprehensive fallback scenarios and error handling Files: 7 changed, 1200+ insertions(+)
This commit is contained in:
@@ -268,6 +268,24 @@ export interface DailyNotificationPlugin {
|
||||
timeUntilNextMaintenance: number;
|
||||
}>;
|
||||
|
||||
// Exact alarm management
|
||||
getExactAlarmStatus(): Promise<{
|
||||
supported: boolean;
|
||||
enabled: boolean;
|
||||
canSchedule: boolean;
|
||||
fallbackWindow: string;
|
||||
}>;
|
||||
requestExactAlarmPermission(): Promise<void>;
|
||||
openExactAlarmSettings(): Promise<void>;
|
||||
|
||||
// Reboot recovery management
|
||||
getRebootRecoveryStatus(): Promise<{
|
||||
inProgress: boolean;
|
||||
lastRecoveryTime: number;
|
||||
timeSinceLastRecovery: number;
|
||||
recoveryNeeded: boolean;
|
||||
}>;
|
||||
|
||||
// Existing methods
|
||||
scheduleDailyNotification(options: NotificationOptions | ScheduleOptions): Promise<void>;
|
||||
getLastNotification(): Promise<NotificationResponse | null>;
|
||||
|
||||
Reference in New Issue
Block a user