Skip to main content
AnkiDroid Companion’s main feature is the ability to review flashcards directly from Android notifications without opening the app. This provides a convenient way to practice your decks throughout the day.

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
Expanded View
  • 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:
ButtonEase LevelMeaning
Button 1EASE_1Again (didn’t remember)
Button 2EASE_2Hard
Button 3EASE_3Good
Button 4EASE_4Easy
These buttons work exactly like they do in AnkiDroid, scheduling your next review accordingly.

What Happens After You Answer

When you tap an answer button:
  1. Card is graded - Your response is recorded in AnkiDroid with the selected ease rating
  2. Time tracking - The time you spent on the card is calculated and sent to AnkiDroid (from Notifications.kt:49-52 and AnkiDroidHelper.java:273-284)
  3. Next card loads - The notification automatically updates with the next scheduled card
  4. Silent update - Subsequent cards appear silently to avoid notification sounds for each card (Notifications.kt:37)
// From NotificationReceiver.kt:22-37
private fun respondCard(context: Context, ease: Int) {
    var mAnkiDroid = AnkiDroidHelper(context)
    val localState = mAnkiDroid.storedState
    
    if (localState != null) {
        mAnkiDroid.reviewCard(localState.noteID, localState.cardOrd, 
                             localState.cardStartTime, ease)
    }
    
    // Move to next card
    val nextCard = mAnkiDroid.queryCurrentScheduledCard(localState.deckId)
    if (nextCard != null) {
        mAnkiDroid.storeState(localState.deckId, nextCard)
        Notifications.create().showNotification(context, nextCard, 
                                               mAnkiDroid.currentDeckName, true)
    }
}

When the Deck is Finished

When you complete all scheduled cards in your deck:
  1. Completion notification appears with the message:
    • “Congrats! You’ve finished the deck!”
    • “New notifications will arrive when it’s time to study!”
  2. Notification becomes dismissible - The persistent flag is removed, so you can swipe it away (Notifications.kt:79)
  3. Background worker starts checking - Every 8 hours, the app checks if new cards are available (MainActivity.kt:48-49)
  4. 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
This design ensures you don’t accidentally dismiss a notification while cards are still available for review.

Notification Permissions

AnkiDroid Companion requires the POST_NOTIFICATIONS permission on Android 13+ to display notifications. See the Permissions page for details on granting this permission.
If notifications aren’t appearing, check your Android system settings to ensure notifications are enabled for AnkiDroid Companion.

Build docs developers (and LLMs) love