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:
@@ -40,6 +40,44 @@ export class DailyNotificationWeb implements DailyNotificationPlugin {
|
||||
timeUntilNextMaintenance: 0
|
||||
};
|
||||
}
|
||||
|
||||
async getExactAlarmStatus(): Promise<{
|
||||
supported: boolean;
|
||||
enabled: boolean;
|
||||
canSchedule: boolean;
|
||||
fallbackWindow: string;
|
||||
}> {
|
||||
console.log('Get exact alarm status called on web platform');
|
||||
return {
|
||||
supported: false,
|
||||
enabled: false,
|
||||
canSchedule: false,
|
||||
fallbackWindow: 'Not applicable on web'
|
||||
};
|
||||
}
|
||||
|
||||
async requestExactAlarmPermission(): Promise<void> {
|
||||
console.log('Request exact alarm permission called on web platform');
|
||||
}
|
||||
|
||||
async openExactAlarmSettings(): Promise<void> {
|
||||
console.log('Open exact alarm settings called on web platform');
|
||||
}
|
||||
|
||||
async getRebootRecoveryStatus(): Promise<{
|
||||
inProgress: boolean;
|
||||
lastRecoveryTime: number;
|
||||
timeSinceLastRecovery: number;
|
||||
recoveryNeeded: boolean;
|
||||
}> {
|
||||
console.log('Get reboot recovery status called on web platform');
|
||||
return {
|
||||
inProgress: false,
|
||||
lastRecoveryTime: 0,
|
||||
timeSinceLastRecovery: 0,
|
||||
recoveryNeeded: false
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedule a daily notification
|
||||
|
||||
Reference in New Issue
Block a user