From 07f559c6be2ce8257f9db7959f0537143bd367cc Mon Sep 17 00:00:00 2001 From: euforic Date: Tue, 10 Dec 2013 14:16:43 -0800 Subject: [PATCH] Resolve TIMOB-14503 LiveView: A Live-View enabled app should force the screen to stay on and bump version --- build/liveview.js | 6 ++++++ build/liveview.min.js | 5 +---- lib/platform/_tail.js | 6 ++++++ package.json | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/build/liveview.js b/build/liveview.js index 714eb59..c96c33e 100644 --- a/build/liveview.js +++ b/build/liveview.js @@ -669,4 +669,10 @@ Module.prototype.cache = function() { Module.patch(globalScope); + // Prevent display from sleeping + + Titanium.App.idleTimerDisabled = true; + Titanium.UI.View.keepScreenOn = true; + + })(this); \ No newline at end of file diff --git a/build/liveview.min.js b/build/liveview.min.js index 0b018e9..6780312 100644 --- a/build/liveview.min.js +++ b/build/liveview.min.js @@ -1,4 +1 @@ -/*! - * liveview Titanium CommonJS require with some Node.js love and dirty hacks - * Copyright (c) 2013 Appcelerator - */(function(globalScope){function Process(){if(!(this instanceof Process))return new Process;this.title="titanium",this.version="",this.moduleLoadList=[],this.versions={},this.arch=Ti.Platform.architecture,this.platform=Ti.Platform.osname,this.hardware=(""+Ti.Platform.model).replace("google_")}function Emitter(obj){if(obj)return mixin(obj)}function mixin(obj){for(var key in Emitter.prototype)obj[key]=Emitter.prototype[key];return obj}function Socket(opts){if(!(this instanceof Socket))return new Socket(opts);opts=opts||{},this.timeout=5e3,this.host=opts.host,this.port=opts.port,this.retry=opts.retry,this.bytesRead=0,this.bytesWritten=0,this.ignore=[]}function Module(id){this.filename=id+".js",this.id=id,this.exports={},this.loaded=!1}Process.prototype.__proto__=Emitter.prototype,Emitter.prototype.on=function(event,fn){return this._callbacks=this._callbacks||{},(this._callbacks[event]=this._callbacks[event]||[]).push(fn),this},Emitter.prototype.once=function(event,fn){function on(){self.off(event,on),fn.apply(this,arguments)}var self=this;return this._callbacks=this._callbacks||{},fn._off=on,this.on(event,on),this},Emitter.prototype.off=function(event,fn){this._callbacks=this._callbacks||{};var callbacks=this._callbacks[event];if(!callbacks)return this;if(1==arguments.length)return delete this._callbacks[event],this;var i=callbacks.indexOf(fn._off||fn);return~i&&callbacks.splice(i,1),this},Emitter.prototype.emit=function(event){this._callbacks=this._callbacks||{};var args=[].slice.call(arguments,1),callbacks=this._callbacks[event];if(callbacks){callbacks=callbacks.slice(0);for(var i=0,len=callbacks.length;i