feat(android): implement Phase 1.3 rolling window safety
- Add DailyNotificationRollingWindow with capacity-aware scheduling - Implement iOS capacity limits (64 pending, 20 daily) vs Android (100, 50) - Add automatic window maintenance every 15 minutes - Add manual maintenance triggers and statistics API - Integrate rolling window with TTL enforcer and scheduler - Add comprehensive unit tests for rolling window functionality - Add rolling window methods to TypeScript interface - Add phase1-3-rolling-window.ts usage examples This completes Phase 1 core infrastructure: - Today's remaining notifications are always armed - Tomorrow's notifications armed only if within iOS caps - Automatic window maintenance prevents notification gaps - Platform-specific capacity management prevents limits - Integration with existing TTL enforcement and scheduling Files: 7 changed, 928 insertions(+)
This commit is contained in:
@@ -23,6 +23,23 @@ export class DailyNotificationWeb implements DailyNotificationPlugin {
|
||||
// Web implementation placeholder
|
||||
console.log('Configure called on web platform');
|
||||
}
|
||||
|
||||
async maintainRollingWindow(): Promise<void> {
|
||||
console.log('Maintain rolling window called on web platform');
|
||||
}
|
||||
|
||||
async getRollingWindowStats(): Promise<{
|
||||
stats: string;
|
||||
maintenanceNeeded: boolean;
|
||||
timeUntilNextMaintenance: number;
|
||||
}> {
|
||||
console.log('Get rolling window stats called on web platform');
|
||||
return {
|
||||
stats: 'Web platform - rolling window not applicable',
|
||||
maintenanceNeeded: false,
|
||||
timeUntilNextMaintenance: 0
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedule a daily notification
|
||||
|
||||
Reference in New Issue
Block a user