1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 12:00:08 +02:00

First version of apps launching automatically after installation.

This commit is contained in:
Simo Kinnunen 2014-03-25 21:12:05 +09:00
parent becda09b0c
commit 8ed3ae1784
4 changed files with 54 additions and 12 deletions

View file

@ -19,6 +19,16 @@ module.exports = syrup.serial()
var source = new stream.Readable().wrap(request(message.url))
var seq = 0
adb.install(options.serial, source)
.then(function() {
if (message.launchActivity) {
log.info(
'Launching activity with action "%s" on component "%s"'
, message.launchActivity.action
, message.launchActivity.component
)
return adb.startActivity(options.serial, message.launchActivity)
}
})
.then(function() {
log.info('Installed "%s"', message.url)
push.send([