{ "id": "120372", "key": "TIMOB-15324", "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": "15703", "description": "2013 Sprint 22", "name": "2013 Sprint 22", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "15704", "description": "2013 Sprint 22 API", "name": "2013 Sprint 22 API", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-28T21:24:30.000+0000", "created": "2013-09-23T23:56:08.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_module", "qe-testadded" ], "versions": [], "issuelinks": [ { "id": "32234", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "116301", "key": "MOD-1846", "fields": { "summary": "ti.cloudpush: \"Hide trays when focused\" is not being honored ", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "32107", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "116302", "key": "MOD-1851", "fields": { "summary": "ti.cloudpush: Sound and Vibrate work even when the app is in foreground", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "32233", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "116303", "key": "MOD-1899", "fields": { "summary": "ti.cloudpush: Not getting an alert when push focuses app", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-20T00:08:06.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": "Cloudpush module wants to know if the current Titanium activity is in the foreground which is between a call to onResume() until a call to onPause().", "attachment": [], "flagged": false, "summary": "Android: Expose the status of the current activity (foreground or background) to module developers", "creator": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "276460", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4836\nFor FR:\n1. Create a new module.\n{code}\n~/titanium_mobile/dist/mobilesdk-3.2.0-osx/mobilesdk/osx/3.2.0/titanium.py create --platform=android --type=module --name=test --id=com.appcelerator.test --android=~/android-sdks/\n{code}\n2. Add a new method in the module source file test/src/com/appcelerator/test/TestModule.java:\n{code}\n\n\t@Kroll.method\n\tpublic boolean isCurrentActivityInForeground()\n\t{\n\t\treturn TiApplication.isCurrentActivityInForeground();\n\t}\n{code}\n3. Add the above module to a mobile project and paste the below code to app.js.\n{code}\nvar test = require(\"com.appcelerator.test\");\n\nvar win = Ti.UI.createWindow({\n\tbackgroundColor: \"white\"\n});\n\nvar b = Ti.UI.createButton({\n\ttitle: \"isCurrentActivityInForeground\"\n});\n\nb.addEventListener(\"click\", function(){\n\talert(\"foreground: \" + test.isCurrentActivityInForeground());\n});\n\nwin.add(b);\nwin.open();\n{code}\n4. Run the project. Click the button. Should see an alert \"foreground: true\".", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T21:31:17.000+0000", "updated": "2013-10-23T21:31:17.000+0000" }, { "id": "277103", "author": { "name": "plv", "key": "plv", "displayName": "Paul Lv", "active": false, "timeZone": "Asia/Shanghai" }, "body": "[~pwang] [~hpham] Could you please let me know when and which version of Titanium SDK I can use, that contains this code change? I may want to implement this on ti.cloudpush side earlier.", "updateAuthor": { "name": "plv", "key": "plv", "displayName": "Paul Lv", "active": false, "timeZone": "Asia/Shanghai" }, "created": "2013-10-29T04:07:38.000+0000", "updated": "2013-10-29T04:07:38.000+0000" }, { "id": "277175", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~plv], the PR was merged yesterday so it should be in the latest [CI build|http://builds.appcelerator.com.s3.amazonaws.com/index.html#master]", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-29T17:21:51.000+0000", "updated": "2013-10-29T17:21:51.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }