How to run cordova plugin in Android background service?

There is no direct support for background service in Phonegap/Cordova apps.
The reason is that your hybrid app is written in JS, and your JS code runs in an Activity that has a webview.
As soon as you exit your app, the app is suspended.

If you really want to have background service in android, you can write your Android service in Java (native) and call your service from your JS code. (Native for background service & JS for your app)

This link might help you: