use ubuntu-app-stop to stop the app more cleanly

Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/bc919c10
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/bc919c10
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/bc919c10

Branch: refs/heads/master
Commit: bc919c100e4bd89be12b8be141d7f1d7e4dbce40
Parents: 78ea9da
Author: David Barth <[email protected]>
Authored: Tue May 17 18:39:52 2016 +0200
Committer: David Barth <[email protected]>
Committed: Tue May 17 18:39:52 2016 +0200

----------------------------------------------------------------------
 bin/templates/project/cordova/lib/run.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/bc919c10/bin/templates/project/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/run.js 
b/bin/templates/project/cordova/lib/run.js
index ba622a7..6373639 100644
--- a/bin/templates/project/cordova/lib/run.js
+++ b/bin/templates/project/cordova/lib/run.js
@@ -143,9 +143,9 @@ function runOnDevice(rootDir, debug, target, architecture, 
framework) {
 
     assert.ok(names.length == 1);
 
-    logger.info('Killing application if already running on your device.');
+    logger.info('Stopping application if needed.');
 
-    Devices.adbExec(target, 'shell "ps -A -eo pid,cmd | grep cordova-ubuntu | 
awk \'{ print \\$1 }\' | xargs kill -9"');
+    Devices.adbExec(target, 'shell "ubuntu-app-stop  \\`ubuntu-app-triplet ' + 
appId + '\\`"');
 
     if (debug)
         Devices.adbExec(target, 'forward --remove-all');


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to