Starting from B4A v6.50 services support the #Extends attribute.
This is useful for libraries that need to extend a service.
The previous solution was to communicate with a B4A service with a specific name. This was more cumbersome and limited.
The #Extends attribute allows the B4A service to directly extend the library service.
An example of the NotificationListener library implemented with #Extends is attached.
The Java source code: https://www.b4x.com/android/forum/attachments/notificationlistener_source-zip.50535/
The B4A project is attached. Notice the manifest editor code which adds the intent filter and permission to the B4A service.
This is useful for libraries that need to extend a service.
The previous solution was to communicate with a B4A service with a specific name. This was more cumbersome and limited.
The #Extends attribute allows the B4A service to directly extend the library service.
An example of the NotificationListener library implemented with #Extends is attached.
The Java source code: https://www.b4x.com/android/forum/attachments/notificationlistener_source-zip.50535/
The B4A project is attached. Notice the manifest editor code which adds the intent filter and permission to the B4A service.
Attachments
Last edited: