Is it possible to run a background service if I close my Ionic/Cordova app (both for iOS and Android) ?
For the purpose I picked that pluging https://github.com/katzer/cordova-plugin-background-mode
So far I have that code:
$ionicPlatform.ready(function () {
            cordova.plugins.backgroundMode.isEnabled();
            cordova.plugins.backgroundMode.configure({
                silent: true
            }) 
              ............
            ///do some task
)}
It works fine if the app goes to the foreground but as soon as I close the application the task I am running stops as well. So is there any workaround/way to make my task running even if the app is closed ?
EDIT:
I have also added permissions for both iOS and Andorid but I am getting the same result.
EDIT 2:
What am I trying to do in background is to write my own implementation of significant location-change service since there is no free plugin for Cordova or PhoneGap that can work with both iOS and Android.
 
     
     
    