{ "id": "62734", "key": "TIMOB-2102", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11366", "description": "", "name": "Sprint 2011-34", "archived": true, "released": true, "releaseDate": "2011-08-29" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-09-02T13:59:09.000+0000", "created": "2011-04-15T03:10:31.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "module_window", "parity", "qe-testadded" ], "versions": [ { "id": "11260", "description": "", "name": "Release 1.6.2", "archived": true, "released": true, "releaseDate": "2011-04-20" } ], "issuelinks": [ { "id": "12632", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "79930", "key": "TIMOB-5190", "fields": { "summary": "Android: Add \"Ti.App.idleTimerDisabled\" support", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-02-08T15:25:19.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Expose ability to keep the display from going to sleep.

{html}", "attachment": [], "flagged": false, "summary": "Android: Expose Keep Screen On", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127503", "author": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

+1 for this, would be a nice addition to 1.5.0

\n

I've got some \"info at a glance\" apps which all pretty much rely\non being able to glance and get info without having to constantly\nwake the device. Thanks again for adding the ticket Don.

{html}", "updateAuthor": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:10:31.000+0000", "updated": "2011-04-15T03:10:31.000+0000" }, { "id": "163861", "author": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "body": "setKeepScreenOn is the recommended method for GUI. WakeLock is needed for services. The following post is from an Android framework engineer:\r\n\r\n{quote}\r\nsetKeepScreenOn() does prevent it from locking; it is just another way of \r\nsetting the window flag to keep the screen on. \r\n\r\nPLEASE use these APIs instead of wake locks if keeping the screen on is \r\nassociated with an activity or window. There are so many advantages: no \r\nneed to get an additional permission, no chance you can accidentally cause \r\nthe user's screen to stay on when they leave your app, no chance to have \r\nbugs like here where you crash, and just so much easier to do. \r\n\r\nDianne Hackborn \r\nAndroid framework engineer \r\nhack...@android.com \r\n{quote}", "updateAuthor": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "created": "2011-08-24T09:18:36.000+0000", "updated": "2011-08-24T09:18:36.000+0000" }, { "id": "163930", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#000033',\r\n\tnavBarHidden : true\r\n});\r\n\r\nvar sw1 = Ti.UI.createSwitch({\r\n\twidth : \"100dp\",\r\n\theight : \"50dp\",\r\n\tbottom : \"20dp\",\r\n\tleft : \"20dp\",\r\n\tvalue : false,\r\n\texitOnClose : true,\r\n\ttitle: \"View\",\r\n\tstyle : Ti.UI.Android.SWITCH_STYLE_CHECKBOX\r\n});\r\n\r\nsw1.addEventListener('click', function(e) {\r\n\tif (e.source.value) {\r\n\t\tsw1.keepScreenOn = true;\r\n\t} else {\r\n\t\tsw1.setKeepScreenOn(false);\r\n\t}\r\n});\r\n\r\nvar sw2 = Ti.UI.createSwitch({\r\n\twidth : \"100dp\",\r\n\theight : \"50dp\",\r\n\tbottom : \"20dp\",\r\n\tright : \"20dp\",\r\n\tvalue : false,\r\n\texitOnClose : true,\r\n\ttitle: \"Window\",\r\n\tstyle : Ti.UI.Android.SWITCH_STYLE_CHECKBOX\r\n});\r\n\r\nsw2.addEventListener('click', function(e) {\r\n\tif (e.source.value) {\r\n\t\tsw2.keepScreenOn = true;\r\n\t} else {\r\n\t\tsw2.setKeepScreenOn(false);\r\n\t}\r\n});\r\n\r\nvar b1 = Ti.UI.createButton({\r\n\ttitle : 'HW Window w/ kSOn=True',\r\n\ttop : \"20dp\",\r\n\twidth : \"auto\"\r\n});\r\n\r\nb1.addEventListener('click', function() {\r\n\tvar w = Ti.UI.createWindow({\r\n\t\tbackgroundColor : 'green',\r\n\t\tnavBarHidden : false,\r\n\t\tkeepScreenOn : true,\r\n\t\ttitle : \"Created with keepScreenOn=true\"\r\n\t});\r\n\tw.open();\r\n});\r\n\r\nvar b2 = Ti.UI.createButton({\r\n\ttitle : 'Window w/ kSOn=True',\r\n\ttop : \"60dp\",\r\n\twidth : \"auto\"\r\n});\r\n\r\nb2.addEventListener('click', function() {\r\n\tvar w = Ti.UI.createWindow({\r\n\t\tbackgroundColor : 'red',\r\n\t\tkeepScreenOn : true\r\n\t});\r\n\tvar b = Ti.UI.createButton({\r\n\t\ttitle : \"Close\"\r\n\t});\r\n\tb.addEventListener('click', function() {\r\n\t\tw.close();\r\n\t});\r\n\t\r\n\tw.add(b);\r\n\tw.open();\r\n});\r\n\t\r\nwin.add(sw1);\r\nwin.add(sw2);\r\nwin.add(b1);\r\nwin.add(b2);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-24T14:13:58.000+0000", "updated": "2011-08-24T14:13:58.000+0000" }, { "id": "182469", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 1.0.8.201201262211\r\nTi Mob SDK 1.9.0.v20120207171634\r\nOSX Lion 10.7.3\r\nNexus S OS 2.3.6\r\n\r\nVerified that I was able to keep the screen on using the sample code provided", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-08T15:25:03.000+0000", "updated": "2012-02-08T15:25:03.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }