Cordova background processes - running while

I have an Cordova (Angular 1.x) application that is primarily aimed at Android & iOS devices - I am looking to implement background processes into the application. I have come across the following plugin -

While the plugin does work, the app is always running in the background (which I’d expect to use a fair bit of battery life quickly) - can anyone suggest the best way or a plugin that will allow me to run a background process while the app itself has something to upload?

So - in the background the app checks if it has data to send - if so it will send this in the background, once it has finished sending it closes the background process so the app is running constantly.

Any ideas?

Cordova 7.x app using Angular 1.x

Does AngularJS have rxjs support? In Angular you could write a one-line Observable for this.

I am using a very old version of Angular 1.3.x - although plan to upgrade to a Angular 4.x in the future but i will look into rxjs support