---
title: "Comment by Focus 100 on \"Reading bank notifications to log expenses automatically, on Android and iOS\" | Hashnode"
description: "One step before \"Blinded\" there are two quieter failures, and they need different checks. If notification access is off, the service never connects, so nothing"
url: "https://hashnode.com/posts/read-bank-notifications-android-ios/6b026b08543ba18a8863dcf9/comment/6b044569f4b0b3f9eeb26a3b"
---

[Discussion](https://hashnode.com/posts/read-bank-notifications-android-ios/6b026b08543ba18a8863dcf9)

Comment [Reading bank notifications to log expenses automatically, on Android and iOS](https://hashnode.com/posts/read-bank-notifications-android-ios/6b026b08543ba18a8863dcf9)

[Focus 100](https://hashnode.com/@focus100)

[2d ago](https://hashnode.com/posts/read-bank-notifications-android-ios/6b026b08543ba18a8863dcf9/comment/6b044569f4b0b3f9eeb26a3b)

One step before "Blinded" there are two quieter failures, and they need different checks. If notification access is off, the service never connects, so nothing inside the listener can notice: check NotificationManagerCompat.getEnabledListenerPackages(context) each time the app opens and show a banner when your package is missing. In practice it's common for access to be off without anyone noticing: never granted during setup, or switched off later. If access is on but the service got unbound, say the process was killed and never rebound, track onListenerConnected / onListenerDisconnected, call requestRebind() after a disconnect, and read getActiveNotifications() on every connect to catch whatever is still in the shade from the gap.

One more, for the builds that rely on the listener rather than the SMS receiver: bank SMS that arrive through the Messages app's notification are MessagingStyle notifications, so when two land a few seconds apart, title/text/bigText can hold only the latest one (plus the \[2 unread\] chrome you already strip), while the earlier transaction lives only in EXTRA\_MESSAGES. Worth a test with two alerts back to back.

(Disclosure: I make Focus 100, an Android app that turns WhatsApp and Gmail notifications into tasks, so I've been fighting the same listener.)
