diff --git a/install/sample-project/www/nodejs-project/main.js b/install/sample-project/www/nodejs-project/main.js index a9bca92..ea6e6cc 100644 --- a/install/sample-project/www/nodejs-project/main.js +++ b/install/sample-project/www/nodejs-project/main.js @@ -35,8 +35,9 @@ cordova.channel.on('myevent', (msg) => { // Handle the 'pause' and 'resume' events. // These are events raised automatically when the app switched to the // background/foreground. -cordova.app.on('pause', () => { +cordova.app.on('pause', (pauseLock) => { console.log('[node] app paused.'); + pauseLock.release(); }); cordova.app.on('resume', () => {