This example uses the notification listener extension and itoo extension (Version 4.5.0 custom extension with foregroundservice type =SpecialUse).
What does the example app provide?
The example app listens to notifications and speaks its content while the app is in the background. This can be useful, if you want to listen to your received notifications while driving. Another use case could be to listen to incoming emails and play a sound after an order arrives (idea taken from here ).
Screenshot of the user interface
Screenshot of the blocks (Version 4)
The notification listener extension uses the itoox-wrapper library by @Kumaraswamy, which helps to directly invoke Itoo (if present) to call procedures from the background. No persistent background service or persistent notification is required anymore!
While starting the service, you have to confirm notification access for the app.
The notification listener extension offers the 2 background procedures OnCreate and OnNotificationReceived, which will be called by Itoo from the background. These procedures run in the background, so it is not possible to use global variables or user interface components like labels, textboxes etc there.
How does it work?
OnCreatewill be initially called when Taifun notification listener begins. Here we register the events, in this case the AfterSpeaking event of the Text To Speech component.- When a new notification arrives, the
OnNotificationReceivedprocedure will be invoked. Here the received message will be spoken - After that, in the
AfterSpeakingevent of the Text To Speech component a short sound will be played by the Player component - The Notifier1.LogInfo blocks can help debugging using Logcat
Test
Tested today targeting SDK36 on the test server on Samsung Galaxy A54 running Android 16.
Source file Version 4
nlsitoo.aia (111.2 KB)
You will have to build the project to be able to use it.
Taifun
PS: Thank you very much @Kumaraswamy for helping me with the updates of the notificationlistener extension and providing your *itoox-wrapper* library! Thank you also for your powerful itoo extension! Without you this example would not have been possible.











