From 0573d0b5c2defceb87c4b2f66bb98f81feb2f3dd Mon Sep 17 00:00:00 2001 From: Seungkeun Lee Date: Tue, 12 Jan 2016 12:51:23 +0900 Subject: [PATCH] Update cli template to use new appfw - Use tizen-appliation Change-Id: Ida641301266e518c1baf5220694fa326aa95fcf1 --- cli/tizen-app-template/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cli/tizen-app-template/index.js b/cli/tizen-app-template/index.js index 2a7093e..374f6ef 100755 --- a/cli/tizen-app-template/index.js +++ b/cli/tizen-app-template/index.js @@ -1,12 +1,8 @@ #!/usr/bin/env node -var appfw = require('appfw'); +var appfw = require('tizen-application'); -appfw.on('create' , function() { - console.log('!! created !!'); -}); - -appfw.on('service' , function() { - console.log('!! service !!'); +appfw.on('appcontrol' , function(appcontrol) { + console.log('!! appcontrol operation : ' + appcontrol.operation); }); appfw.on('pause' , function() { @@ -21,4 +17,8 @@ appfw.on('terminate' , function() { console.log('!! terminate !!'); }); -appfw.init('{appid}'); +appfw.start().then(function(){ + console.log('!! started !!'); +}).catch(function(){ + console.log('!! fail to run !!'); +}); -- 2.7.4