Cordova backgroundMode plugin doesn't work
<p>I used Cordova backgroundMode plugin. And I have misunderstanding of it.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>document.addEventListener('deviceready', function ()
    {
             // Android customization 
 
             cordova.plugins.backgroundMode.setDefaults({ text: 'Doing heavy tasks.' });
             
             // Enable background mode
             cordova.plugins.backgroundMode.enable();
             
             if (cordova.plugins.backgroundMode.isEnabled()) {
                 console.log("Your value is : " + cordova.plugins.backgroundMode.isEnabled());
             }
             else { alert("its not enabled"); }

 
             // Called when background mode has been activated
             cordova.plugins.backgroundMode.onactivate = function ()
             {
                 console.log("its in bk mode");
                 setTimeout(function ()
                 {
                     // Modify the currently displayed notification
                     cordova.plugins.backgroundMode.configure({
                         text: 'Running in background for more than 5s now.'

                     }); 

                 }, 5000);
             }             
 
         }, false);</code></pre>
</div>
</div>
</p>

<p><code>onactivate</code> function should works when the app goes to the background mode, right? </p>

<p>I used Visual Studio 2015/Ripple to fire pause mode, which means the app now in background mode. So I should get a message in the console but I don't.</p>

<p>This a screenshot of the ripple and the console:
<a href="https://i.stack.imgur.com/IDggh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IDggh.png" alt="enter image description here"></a>
Thank you</p>