diff --git a/lib/roles/app.js b/lib/roles/app.js index 33e24286..1d652eed 100644 --- a/lib/roles/app.js +++ b/lib/roles/app.js @@ -41,6 +41,7 @@ module.exports = function(options) { io.set('log level', 1) io.set('browser client', false) + io.set('transports', ['websocket']) app.use('/static/bower_components', express.static(pathutil.resource('bower_components'))) 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 diff --git a/lib/roles/device/resources/inputagent.js b/lib/roles/device/resources/inputagent.js index 8588ef2b..b61d951b 100644 --- a/lib/roles/device/resources/inputagent.js +++ b/lib/roles/device/resources/inputagent.js @@ -14,7 +14,7 @@ module.exports = syrup.serial() var log = logger.createLogger('device:resources:inputagent') var resource = { - requiredVersion: '~0.1.2' + requiredVersion: '~0.2.0' , pkg: 'jp.co.cyberagent.stf.input.agent' , main: 'jp.co.cyberagent.stf.input.agent.InputAgent' , apk: pathutil.vendor('InputAgent/InputAgent.apk') diff --git a/res/app/components/stf/socket/socket-service.js b/res/app/components/stf/socket/socket-service.js index e98781fa..e9d6e914 100644 --- a/res/app/components/stf/socket/socket-service.js +++ b/res/app/components/stf/socket/socket-service.js @@ -1,7 +1,9 @@ var io = require('socket.io') -module.exports = function SocketFactory($rootScope) { - var socket = io.connect() +module.exports = function SocketFactory() { + var socket = io.connect(null, { + reconnect: false + }) socket.scoped = function($scope) { var listeners = [] diff --git a/vendor/InputAgent/InputAgent.apk b/vendor/InputAgent/InputAgent.apk index a1822724..373ba8be 100644 Binary files a/vendor/InputAgent/InputAgent.apk and b/vendor/InputAgent/InputAgent.apk differ