@Honza
my previous msg was to solve rodrigo's problem. Regarding background service stopping. Mine works fine. But on one of my unit i have a DS battery save app. It kills the droidscript background music servicr app. So i think there is no problem with droidscript code since it look like most people tried the ds app and works fine. In your case you might have some app that kills the background service. Apps like ds battery saver or greenify or similar apps. Stop these app from running and try the background service of DS again it should work. Or try it on a different android unit.
This should be placed in your Service.js OnStart function to ensure it is called within a few seconds of startup. That is an Android requirement to prevent it reverting to a background service.
You can also call it as many times as you like to change the notification message.
The docs can also be seen at
https://alex-symbroson.github.io/Docs/docs/app/CreateService.htm#Methods
If you search this group for
"SetInForeground" you will probably find some helpful discussion.
Try changing both instances of "" with the word null (not in quotes)
I can't guarantee that's the problem but I definitely recommend making the change anyway.