I have been trying to use #Extends Attribute, and I found this thread with Notification Listener library https://www.b4x.com/android/forum/threads/example-of-extends-in-service.74880/#content
I added to the example a code to clear one notification:
Where sbn is a StatusBarNotification received in sub Listener_NotificationPosted(SBN As StatusBarNotification)
When I try to clear one notification, I get this error:
It's probably a question for Erel, since he made this library for this example. But anyone is welcome with any suggestions.
I added to the example a code to clear one notification:
B4X:
Sub Clear(sbn As StatusBarNotification)
listener.ClearNotification(sbn)
End Sub
When I try to clear one notification, I get this error:
B4X:
notificationservice_clear (java line: 130)
java.lang.RuntimeException: java.lang.IllegalArgumentException: Expected receiver of type android.service.notification.NotificationListenerService, but got anywheresoftware.b4a.objects.NotificationListenerWrapper$NotificationListener
at anywheresoftware.b4a.objects.NotificationListenerWrapper$NotificationListener.ClearNotification(NotificationListenerWrapper.java:90)
at b4a.notificationlistener.notificationservice._clear(notificationservice.java:130)