I am currently using Ionic 2 and I have a requirement for my app to perform certain tasks even when it is closed, similar to how Gmail continues to provide notifications all the time.
After some research, I came across this documentation: https://ionicframework.com/docs/v2/native/background-mode/
However, instead of using a plugin that runs the entire application in background mode, I would like to create a specific service with custom methods that can run efficiently in the background. Can someone guide me on how to achieve this?