How feritiro/japanesedictionary-notification-androidstudio works
JP Notify passively presents JLPT kanji flashcards when the phone screen turns off. Users select JLPT levels in the app; the screen-off receiver delegates notification creation, which reads those preferences, fetches a random matching entry from the bundled offline SQLite database, and posts a custom-layout notification. The sampled source shows this main path and an unlock receiver that can reopen the app. Other UI fragments are navigation scaffolding. The manifest and unsampled resources were not inspected, so platform wiring beyond the documented and excerpted calls is omitted.
Main entry points: NotificationUtils.kt Notification builder · MainActivity.kt Settings activity · ScreenOffReceiver.kt Screen-off receiver · KanjiDatabaseHelper.kt Kanji database helper
Components 11
Level settings
- Settings activity
app/src/main/java/com/itiro/jp_notify/MainActivity.kt - Level preferences
Flashcard delivery
- Screen-off receiver
app/src/main/java/com/itiro/jp_notify/ScreenOffReceiver.kt - Notification builder
app/src/main/java/com/itiro/jp_notify/NotificationUtils.kt - Custom flashcard layout
app/src/main/res/layout/notification_custom.xml - Unlock receiver
app/src/main/java/com/itiro/jp_notify/UnlockReceiver.kt
Kanji content
- Kanji database helper
app/src/main/java/com/itiro/jp_notify/KanjiDatabaseHelper.kt - Bundled JLPT database
app/src/main/assets/jlpt_words.sqlite
Other components
- App user
- Screen-off event
- Android notifications
Connections 11
- App user → Settings activity: selects levels
app/src/main/java/com/itiro/jp_notify/MainActivity.kt - Settings activity → Screen-off receiver: registers
app/src/main/java/com/itiro/jp_notify/MainActivity.kt - Settings activity → Level preferences: writes levels
app/src/main/java/com/itiro/jp_notify/MainActivity.kt - Screen-off event → Screen-off receiver: broadcasts
README.md - Screen-off receiver → Notification builder: requests notification
app/src/main/java/com/itiro/jp_notify/ScreenOffReceiver.kt - Notification builder → Level preferences: reads levels
app/src/main/java/com/itiro/jp_notify/NotificationUtils.kt - Notification builder → Kanji database helper: queries kanji
app/src/main/java/com/itiro/jp_notify/NotificationUtils.kt - Kanji database helper → Bundled JLPT database: copies and queries
app/src/main/java/com/itiro/jp_notify/KanjiDatabaseHelper.kt - Notification builder → Custom flashcard layout: sets flashcard text
app/src/main/java/com/itiro/jp_notify/NotificationUtils.kt - Notification builder → Android notifications: posts notification
app/src/main/java/com/itiro/jp_notify/NotificationUtils.kt - App user → Unlock receiver: unlocks phone