How Notifications Work
Once you’ve selected a deck and clicked the “Refresh” button in the app, AnkiDroid Companion will display a persistent notification with your next scheduled card.Reading Card Questions
The notification appears in two states: Collapsed View- Shows the card question (front side)
- Displays “Anki • [Deck Name]” as the title
- Tap to expand and see the full card
- Shows the card question at the top
- Displays the answer (back side) below
- Shows 4 answer buttons for grading your response
Card content is automatically stripped of HTML formatting for clean display in notifications. Complex cards with extensive HTML may not display perfectly.
Answering Cards
When you expand the notification, you’ll see four answer buttons corresponding to AnkiDroid’s ease ratings:| Button | Ease Level | Meaning |
|---|---|---|
| Button 1 | EASE_1 | Again (didn’t remember) |
| Button 2 | EASE_2 | Hard |
| Button 3 | EASE_3 | Good |
| Button 4 | EASE_4 | Easy |
What Happens After You Answer
When you tap an answer button:- Card is graded - Your response is recorded in AnkiDroid with the selected ease rating
- Time tracking - The time you spent on the card is calculated and sent to AnkiDroid (from
Notifications.kt:49-52andAnkiDroidHelper.java:273-284) - Next card loads - The notification automatically updates with the next scheduled card
- Silent update - Subsequent cards appear silently to avoid notification sounds for each card (
Notifications.kt:37)
When the Deck is Finished
When you complete all scheduled cards in your deck:-
Completion notification appears with the message:
- “Congrats! You’ve finished the deck!”
- “New notifications will arrive when it’s time to study!”
-
Notification becomes dismissible - The persistent flag is removed, so you can swipe it away (
Notifications.kt:79) -
Background worker starts checking - Every 8 hours, the app checks if new cards are available (
MainActivity.kt:48-49) - New notification appears - When cards become due, a new notification automatically appears
The 8-hour check interval is currently hardcoded. Future versions may allow customization of this interval.
Persistent vs. Dismissible Notifications
- Active cards: Notification is persistent (
setOngoing(true)) and cannot be dismissed - Deck completed: Notification is dismissible (
setOngoing(false)) and can be swiped away
Notification Permissions
AnkiDroid Companion requires thePOST_NOTIFICATIONS permission on Android 13+ to display notifications. See the Permissions page for details on granting this permission.