Service add-ons

Service addons will be automatically started when XBMC starts. These addons must offer the xbmc.service extension point. You can specify when you want your addon to start, using the start tag. If it's isn't here, your addon will automatically start after user login. If you want it to start on XBMC startup, you need to set the start tag to startup. Here's a typical example of the addon.xml the addon needs to provide:

If your addon is meant to be run while XBMC is running, you need to periodically check if XBMC is exiting. The addon is responsible for terminating when XBMC wants to exit. This can be checked by creating a  instance and calling the   method. To wait for this event instead, call.

Example service that prints "hello addon!" every 10 second until XBMC exits:

Gotham and earlier
and  are new in Helix. In Gotham and earlier, use  and check the   attribute periodically.

Example: