From a4a1cd89f0cd9f634d89d1b2ce90f51019eadd24 Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Wed, 26 Mar 2014 13:50:10 +0900 Subject: [PATCH] Emit progress events on APK installation. --- lib/roles/device/plugins/install.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/roles/device/plugins/install.js b/lib/roles/device/plugins/install.js index de4cded4..bacb9845 100644 --- a/lib/roles/device/plugins/install.js +++ b/lib/roles/device/plugins/install.js @@ -18,9 +18,25 @@ module.exports = syrup.serial() log.info('Installing "%s"', message.url) var source = new stream.Readable().wrap(request(message.url)) var seq = 0 + push.send([ + channel + , wireutil.envelope(new wire.TransactionProgressMessage( + options.serial + , seq++ + , 'installing' + )) + ]) adb.install(options.serial, source) .then(function() { if (message.launchActivity) { + push.send([ + channel + , wireutil.envelope(new wire.TransactionProgressMessage( + options.serial + , seq++ + , 'launching activity' + )) + ]) log.info( 'Launching activity with action "%s" on component "%s"' , message.launchActivity.action