Skip to content

Add service() function #470

Open
Open
@codeanticode

Description

@codeanticode

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions