Skip to content

Commit

Permalink
Established Connection of Notification WorkManager in AnkiDroidApp
Browse files Browse the repository at this point in the history
When AnkiDroid starts, notification worker will start if not scheduled previously.
  • Loading branch information
prateek-singh-3212 committed Aug 24, 2022
1 parent 4ba8f97 commit 0808c37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions AnkiDroid/src/main/java/com/ichi2/anki/AnkiDroidApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ public void onCreate() {
Timber.i("AnkiDroidApp: Registering Broadcast Receivers");
TimeZoneChangeReceiver.Companion.registerTimeZoneChangeReceiver(this, new TimeZoneChangeReceiver());

Timber.i("AnkiDroidApp: Starting Workers");
new NotificationHelper(this).startNotificationWorker(0, false);

// TODO: Notification CleanUP. Delete the Notification Service after successful implementation of Notification Work Manager.
// Register for notifications
mNotifications.observeForever(unused -> NotificationService.triggerNotificationFor(this));
Expand Down

0 comments on commit 0808c37

Please sign in to comment.