From e1948601b082f77abe42f8c0e7ffd8f3d3ba6982 Mon Sep 17 00:00:00 2001 From: Den <2119348+dzianisv@users.noreply.github.com> Date: Wed, 3 Jun 2026 03:06:39 -0700 Subject: [PATCH] fix(fdroid): Firebase-free stubs for expo-notifications --- .../interfaces/NotificationListener.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 fdroid/expo-notifications-patches/notifications/interfaces/NotificationListener.java diff --git a/fdroid/expo-notifications-patches/notifications/interfaces/NotificationListener.java b/fdroid/expo-notifications-patches/notifications/interfaces/NotificationListener.java new file mode 100644 index 0000000..5c7940d --- /dev/null +++ b/fdroid/expo-notifications-patches/notifications/interfaces/NotificationListener.java @@ -0,0 +1,37 @@ +package expo.modules.notifications.notifications.interfaces; + +import android.os.Bundle; + +import expo.modules.notifications.notifications.model.Notification; +import expo.modules.notifications.notifications.model.NotificationResponse; + +/** + * Patched version (Firebase-free) for F-Droid builds. + * Removed: import com.google.firebase.messaging.FirebaseMessagingService (only used in javadoc). + */ +public interface NotificationListener { + /** + * Callback called when new notification is received while the app is in foreground. + */ + default void onNotificationReceived(Notification notification) { + } + + /** + * Callback called when new notification response is received. + */ + default boolean onNotificationResponseReceived(NotificationResponse response) { + return false; + } + + /** + * Callback called when notification response is received through package lifecycle listeners. + */ + default void onNotificationResponseIntentReceived(Bundle extras) { + } + + /** + * Callback called when some notifications are dropped. + */ + default void onNotificationsDropped() { + } +}