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.
You can implement a Service class in Java that can be used as a base of the B4A service module.
The Watchface library is one of the first libraries which use this method.
The advantage is that it is more flexible so one app can easily support multiple watchfaces with several Service modules.
You can implement a Service class in Java that can be used as a base of the B4A service module.
The Watchface library is one of the first libraries which use this method.
The advantage is that it is more flexible so one app can easily support multiple watchfaces with several Service modules.