Last updated
Last updated
The development of background service plugins is similar to , with the main difference being the timing of code execution. Background service plugins will automatically start when the software starts, while window plugins will only execute when the user clicks on them. To create a background service plugin, simply add "serviceMode": true
to the main
field in the manifest.json
, as shown below:
Background service plugins can also pop up windows, in which you can display the progress and status of the current background task, allowing users to clearly understand the current state of the plugin.
The final code is as follows:
Complete example code:
Note: You can refer to to learn about all the configuration methods for manifest.json
Note: If the plugin execution process relies on a relative resource library path, you may need to use to make corresponding adjustments when the resource library switches, avoiding errors during the program execution.
This article will describe the basic concepts of background service plugins.