Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e57e2eb
fixed shared alarms
Apr 14, 2025
d994456
added shared alarm functionality with push notifications
Apr 20, 2025
1ff894d
Merge branch 'CCExtractor:main' into shared-alarm
mahendra-918 May 1, 2025
61ebf1b
UI fixes
mahendra-918 May 10, 2025
b5191be
changed offset and userlist
mahendra-918 May 13, 2025
9a14821
Improve share dialog UI: Replace popup with bottom sheet, fix Materia…
mahendra-918 May 13, 2025
a37fe3c
shared alarm in getLatestAlarm.kt
mahendra-918 May 21, 2025
473e658
Update firestore_provider.dart
mahendra-918 May 25, 2025
d72ab5f
Update push_notifications.dart
mahendra-918 May 25, 2025
e5b3c32
Update push_notifications.dart
mahendra-918 May 25, 2025
a15b6d1
Update push_notifications.dart
mahendra-918 May 25, 2025
6544276
Update push_notifications.dart
mahendra-918 May 25, 2025
c11ce5d
Merge pull request #840 from mahendra-918/firestore-authcheck
mahendra-918 May 25, 2025
c13d93a
Update firestore_provider.dart
mahendra-918 May 26, 2025
0a5a04c
Merge pull request #841 from mahendra-918/firestore-authcheck
mahendra-918 May 26, 2025
86a42e8
fixed shared alarms
mahendra-918 May 31, 2025
cb89608
Merge remote changes from testing-sr
mahendra-918 May 31, 2025
01b1fc9
mammama
mahendra-918 Jun 26, 2025
0810970
added negative condition
mahendra-918 Jun 30, 2025
e5851b2
gfdfs
mahendra-918 Jun 30, 2025
6d52015
bnm
mahendra-918 Jun 30, 2025
662ded5
Merge origin/testing3 into sa123
mahendra-918 Jun 30, 2025
257ea93
Merge pull request #1 from mahendra-918/sa123
mahendra-918 Jun 30, 2025
bbe3244
Resolve merge conflicts: integrate negative condition logic with shar…
mahendra-918 Jul 1, 2025
0a2e25d
bhehjfjv
mahendra-918 Jul 1, 2025
4b6045a
Merge pull request #2 from mahendra-918/negativeCon-alarm
mahendra-918 Jul 1, 2025
26ccd6b
Fix snooze duration 0 issue and improve alarm functionality
mahendra-918 Jul 9, 2025
f381f32
feat: Add sunrise alarms, enhanced condition types, and improved shar…
mahendra-918 Jul 12, 2025
a9f343b
fix: Resolve merge conflicts and add missing fields to AlarmModel
mahendra-918 Jul 12, 2025
09498df
feat: Restore all original testing3 features and enhancements
mahendra-918 Jul 12, 2025
54337da
fix location and weather service issues
mahendra-918 Jul 16, 2025
7916d18
Resolve merge conflicts and integrate improvements
mahendra-918 Jul 16, 2025
526a9a0
Update alarm functionality - Flutter controllers/views and Android se…
mahendra-918 Jul 19, 2025
986e8a3
Add debugging scripts for smart control alarms and weather conditions
mahendra-918 Jul 19, 2025
1ca5cd4
Remove deprecated debugging scripts for alarm conditions and weather …
mahendra-918 Jul 19, 2025
2850e35
Remove deprecated debugging scripts for alarm conditions and weather …
mahendra-918 Jul 21, 2025
337ffc8
Refactor alarm settings UI to use bottom sheets for various alarm fea…
mahendra-918 Jul 23, 2025
9f121a3
added timezone feature
mahendra-918 Aug 6, 2025
2f76d49
Merge branch 'testing3' of https://github.com/mahendra-918/ultimate_a…
mahendra-918 Aug 6, 2025
bf99c85
fixed the ascending volume
mahendra-918 Aug 12, 2025
99a182e
fixed the overflows
mahendra-918 Aug 15, 2025
bb224a9
fixed guardian angle
mahendra-918 Aug 16, 2025
be1d2c4
implemented AND and OR for smart controld
mahendra-918 Aug 20, 2025
1e1d36b
feat: Latest updates to smart controls and firestore integration
mahendra-918 Aug 23, 2025
fb72bcd
chore: Remove build artifacts and update .gitignore
mahendra-918 Aug 23, 2025
e57f2bb
fixed bugs
mahendra-918 Mar 3, 2026
3445e71
fixed bugs
mahendra-918 Mar 3, 2026
848d7e0
Merge pull request #864 from mahendra-918/fix/alarm-bugs
mahendra-918 Mar 3, 2026
76e0e84
fix: add snackbar feedback and reset toggle state when guardian permi…
vibhutomer Apr 18, 2026
3d6b655
added full world clock functionality (#876)
inderjeet20 Apr 18, 2026
b36a626
Fix: Remove duplicate and unused imports in end_drawer.dart (#915)
NihalDR Apr 18, 2026
8113428
Fix null-safety crashes in location/weather services (#932)
NihalDR Apr 18, 2026
0364d99
Fix: Re-add support for multiple subdomains & hyphens in Emails (#926)
NihalDR Apr 18, 2026
fc6deff
fix: corrected date suffix logic for 11th, 12th, and 13th (#877)
vibhutomer Apr 18, 2026
e699332
fix: safely merge headers in GoogleHttpClient to prevent unmodifiable…
vibhutomer Apr 19, 2026
f35f217
chore: update safe dependencies for #918 (#919)
V-inaya-K Apr 19, 2026
a436c66
fix: the long pressed alarm is selected by default in Multiple Select…
devxdebanjan Apr 19, 2026
bf44dd0
fix: prevents default home page laggy scroll animation (#870)
devxdebanjan Apr 19, 2026
bd2b448
fix(AlarmModel): correct fromJson initialization (#867) (#868)
dorodb-web22 Apr 19, 2026
41c562b
fix: ensure maxSnoozeCount persists and updates UI correctly (#861)
raghavgupta000001 Apr 19, 2026
a2494ba
Resolves issue#827, where `timeUntilAlarm` wasn't working as Expected…
Gaurav-Kushwaha-1225 Apr 19, 2026
5e70c73
Fix: Replace list equality check with isEmpty in home_controller (#863)
vibhutomer Apr 19, 2026
90e73ad
fix: guarantee isPreviewing state reset using finally block in audio_…
vibhutomer Apr 19, 2026
bf62880
fixed location permission related issues (#829)
kushchoudhary98 Apr 19, 2026
b82e7bb
fix: resolve exponential timer drain in wake-up challenges by adding …
vibhutomer Apr 19, 2026
5de5a51
fix(FirestoreDb): correct getLatestAlarm else branch to use current m…
dorodb-web22 Apr 19, 2026
52f344b
fix: decouple alarm playback from media volume to prevent silent alar…
vibhutomer Apr 19, 2026
9338d66
Enhance Shared Alarm System to Support Full Alarm Feature Set (#940)
NihalDR Apr 19, 2026
85822c6
Merge remote-tracking branch 'origin/main'
NihalDR Apr 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .firebaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"projects": {
"default": "uac2-7d0f9"
"default": "uac-shared-alarm"
}
}
21 changes: 19 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,22 @@ app.*.map.json
/caches
/.fvmrc

# FVM Version Cache
.fvm/
# Build artifacts
android/app/build/
android/.gradle/
**/build/

# Lock files
*.lock
ios/Podfile.lock

# Node modules
node_modules/
**/node_modules/

# Package managers
package-lock.json
yarn.lock

google-services (8).json
google-services.json
81 changes: 78 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Issue: [#562](https://github.com/CCExtractor/ultimate_alarm_clock/issues/562), P

### 3) Profile Switcher and Alarm/Profile Sharing

Effortlessly manage and share custom alarm profiles for different days and occasions, ensuring only the active profiles alarms are prioritized. Alarms and profiles can now be shared with other users using their email addresses, including those with subdomains or hyphens. In-app notifications for received alarms and profiles with the option to either accept or reject them.
Effortlessly manage and share custom alarm profiles for different days and occasions, ensuring only the active profile's alarms are prioritized. Alarms and profiles can now be shared with other users using their email addresses, including those with subdomains or hyphens. In-app notifications for received alarms and profiles with the option to either accept or reject them.
Issue: [#591](https://github.com/CCExtractor/ultimate_alarm_clock/issues/591), Pull-Request: [#584](https://github.com/CCExtractor/ultimate_alarm_clock/pull/584)

### 4) Google Calendar Integration and Date-based Scheduling
Expand All @@ -50,7 +50,7 @@ Issue: [#592](https://github.com/CCExtractor/ultimate_alarm_clock/issues/592), P

### 6) Anti-disturbance

Automatically dismiss alarms if the users screen is on for more than X minutes, indicating they are busy and dont need the alarm.
Automatically dismiss alarms if the user's screen is on for more than X minutes, indicating they are busy and don't need the alarm.
Issue: [#572](https://github.com/CCExtractor/ultimate_alarm_clock/issues/572), Pull-Request: [#574](https://github.com/CCExtractor/ultimate_alarm_clock/pull/574)

### 7) Open-meteo integration and weather fetch logic shift to Kotlin, Location access notification
Expand All @@ -65,7 +65,7 @@ Issue: [#564](https://github.com/CCExtractor/ultimate_alarm_clock/issues/564), P

### 9) Ringtones

Added 5 new royalty-free ringtones and fixed related bugs, including erratic ringtone preview behaviour.
"Added 5 new royalty-free ringtones and fixed related bugs, including erratic ringtone preview behaviour."
Issue: [#595](https://github.com/CCExtractor/ultimate_alarm_clock/issues/595), Pull-Request: [#596](https://github.com/CCExtractor/ultimate_alarm_clock/pull/596)

### 10) UI and bug fixes
Expand Down Expand Up @@ -441,6 +441,81 @@ The `removeUserFromAlarmSharedUsers` function allows the owner of a shared alarm

The "Ultimate Alarm Clock" offers an intuitive and feature-rich user interface, making it easy to set, manage, and customize your alarms while providing a seamless experience.

## 🔔 Shared Alarm Persistence Fix

### Problem
When a user accepts a shared alarm on device B and then kills the app, the alarm would not ring on device B because the app wasn't running to maintain the alarm schedule.

### Solution
We've implemented a comprehensive solution that ensures shared alarms persist even when the app is killed:

#### 1. **Enhanced BootReceiver**
- Automatically reschedules shared alarms after device boot
- Checks `SharedPreferences` for persisted shared alarm data
- Calculates correct time intervals for future alarms

#### 2. **Immediate Scheduling on Acceptance**
- When a user accepts a shared alarm, it's immediately scheduled on the device
- Alarm data is stored in `SharedPreferences` for persistence
- No longer relies solely on the app being active

#### 3. **App Startup Recovery**
- When the app starts, it checks for persisted shared alarms
- Automatically reschedules any valid shared alarms
- Ensures continuity even after app kills

### Testing Instructions

#### Test Scenario: Shared Alarm with Killed App
1. **Setup**:
- Device A: Create and share an alarm (e.g., for 2 minutes from now)
- Device B: Accept the shared alarm

2. **Kill App Test**:
- Device B: Force close the Ultimate Alarm Clock app
- Wait for the alarm time
- **Expected**: Alarm should ring on Device B even though app was killed

3. **Reboot Test**:
- Device B: Accept a shared alarm
- Device B: Restart the device
- **Expected**: Alarm should be rescheduled after boot and ring at the correct time

4. **Verification Commands**:
```bash
# Check if shared alarm is scheduled (Android)
adb -s DEVICE_ID logcat | grep -E "(BootReceiver|SharedAlarm|Scheduled shared alarm)"

# Check SharedPreferences data
adb -s DEVICE_ID logcat | grep -E "(has_active_shared_alarm|shared_alarm_time)"
```

### Architecture Changes

#### Android Native Layer
- **`BootReceiver.kt`**: Enhanced to handle shared alarm rescheduling
- **`MainActivity.kt`**: Added `checkPersistedSharedAlarm` method channel
- **`AlarmUtils.kt`**: Robust alarm scheduling with proper request codes

#### Flutter Layer
- **`NotificationsController.dart`**: Immediate scheduling on alarm acceptance
- **`HomeController.dart`**: App startup shared alarm recovery
- **`FirestoreProvider.dart`**: Persistent shared alarm data management

### Key Benefits
✅ **Persistent Alarms**: Shared alarms work even when app is killed
✅ **Boot Recovery**: Alarms reschedule after device restart
✅ **Real-time Updates**: FCM handles updates when app is closed
✅ **Dual System**: Both local and shared alarms work independently
✅ **Error Handling**: Graceful handling of edge cases and failures

### Debug Logs
The system provides comprehensive logging for troubleshooting:
- `BootReceiver`: Boot-time shared alarm rescheduling
- `MainActivity`: Method channel operations
- `HomeController`: Flutter-side alarm management
- `AlarmReceiver`: Alarm trigger events

## Contribution Guidelines

Thank you for your interest in contributing to the "Ultimate Alarm Clock" project. Contributions from the open-source community are highly valued and help improve the application. Please read the following guidelines to understand how you can contribute effectively.
Expand Down
12 changes: 11 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ android {
}

signingConfigs {
debug {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('debug.keystore')
storePassword 'android'
}
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
Expand Down Expand Up @@ -98,7 +104,11 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"
implementation platform('com.google.firebase:firebase-bom:32.0.0') // Updated Firebase BOM to latest
implementation 'com.google.firebase:protolite-well-known-types:18.0.0'
implementation 'com.google.firebase:firebase-messaging:23.4.1'
implementation 'com.google.firebase:firebase-firestore-ktx:24.9.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.7.3'
implementation("com.android.volley:volley:1.2.1")
implementation("com.google.code.gson:gson:2.10.1")
implementation("androidx.multidex:multidex:2.0.1")
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Loading