Start Service
Kalipso - Form - Actions - Actions Description - Group Others - Start Service
Service is a Global Action Set that you can run as a background process.
Action available for the following operating systems:
Parameters
Service <numeric> - Select a number for a service. Can be Dynamic or 1-10.
Global Action Set - Select a Global Action Set to run as a Service.
Start Type <numeric> - Select how do you want to Start the Service:
1 - Immediate - The ActionSet will start to execute immediatly.
2 - With Delay - The ActionSet will start to execute after the specified delay time.
3 - Periodic - Similar to a Timer, the ActionSet will execute with the specified interval.
Cancel execution if running <numeric>
1 - Yes (Used to cancel a service if it is running while reactivating the service with a call to this action)
2 - No
Delay (ms) <numeric> - Specified the delay or interval depending on the Start Type.
In Win32 (includes Windows CE an Mobile) services are not supported. Calling this, will cause a service to be emulated by the current process, by running the ActionSet in a background thread. But if the project closes, the services will also stop working.
Services require Android 5.0 or later.
It is important to be aware that service executions have high limitations imposed differently by the different O.S.
Periodic services are not ment to be executed with high frequency, they are ment to be executed for example every 1 or 2 hours.
On Win10, the Periodic service delay cannot be lower than 15 min, and the service code will have a time limit of about 30 seconds to run.
On iOS, only immediate services are available, and it will have a time limit of around 3 minutes after the app is suspended. It can be useful if you have some code that you want to get executed even if the user exits your App.
On Android, the system will start to delay the Periodic timer, specially if you specified a high frequency.
On Android you can increase the service priority and ensure it will not be likely to get suspended by using Android Foreground Services. Check SetServiceNotification action for more information.
VERY IMPORTANT: Do not use User Interface code in services. Do not open Forms, Show Message Boxes, Popups, etc. If you do, the behavior is undetermined and can cause the application to crash.
Services are supposed to execute tasks in the Background. If you need to inform the application of something, you can use PostAppNotification action. Database and global variables are shared with the service also.
Last updated