mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
Emit progress events on APK installation.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user