Android NotificationListener, Ionic's file layout

Currently creating a Ionic app that serves as a extra alert to users for when they get notifications, by sending a signal to a Arduino LED. After much extended searching, I have found the imports that I need: Notifications Listener and StatusBarNotifications. The problem is, I am not very knowledgeable at android app development, especially not deeper level things like this. the links are below, if anybody could help me make sense of this.

https://developer.android.com/reference/android/service/notification/NotificationListenerService.html

https://developer.android.com/reference/android/service/notification/StatusBarNotification.html

I do have a general idea of where and when to use these, getting them wired up to a ionic toggle to allow the notifications mode to trigger is the biggest issue for me. Thanks for your time.