From bdd95064bc5d40cb200f370f80387b6ab59dd53b Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Thu, 7 Jun 2018 17:06:45 +0100 Subject: [PATCH] plugin: update sample project for new pause API --- install/sample-project/www/nodejs-project/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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', () => {