Open
Description
Being able to create foreground services is an useful feature. Right now, one needs to add java code to the sketch, which is hard to read and to integrate with the sketch:
https://discourse.processing.org/t/notification-builder/1101
It would be nice to be able to do something like this:
void setup() {
service("task", 2000); // call function task() below every 2 seconds.
}
void draw() {
...
}
void task() {
// code to execute as a foreground service
}
Although this would involve adding new templates into the mode so the service class is generated behind the scenes.