Additional Widgets: `setRecurringAlarm` is not called from AnkiDroid startup
- Likely related: https://github.com/ankidroid/Anki-Android/issues/17151
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Hi @david-allison 👋
I looked into this and it seems setRecurringAlarm is not triggered on app startup.
I'm thinking of restoring alarms in AnkiDroidApp.onCreate() by retrieving active widget IDs and calling setRecurringAlarm for each.
Does this approach sound correct?
Check with @xenonnn4w, it's been a long time since I looked into this.
If there's no reply, have a dive into the docs and see what you find
Thanks ! I'll take look and start working on this.
Hi @xenonnn4w 👋 I was able to reproduce the issue.
After the widget sets the alarm, if the app process is killed (e.g., swiping from recents), the AlarmManager alarms are cleared. When the app process starts again in the background, setRecurringAlarm is not triggered, and no new alarm is created. This causes the widget to stop updating. I'm planning to restore the alarms in AnkiDroidApp.onCreate() by iterating over active widget IDs. Does this approach look correct ?