{ "id": "136685", "key": "TIMOB-17711", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-17T00:53:08.000+0000", "created": "2014-09-16T22:20:16.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [ { "id": "41214", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "108491", "key": "TIMOB-12411", "fields": { "summary": "Android: Ti.Android.getCurrentActivity() fails with an exception", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "45885", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "144551", "key": "TIDOC-2124", "fields": { "summary": "Docs: getCurrentActivity() and getCurrentService() methods are shown for Android in doc.", "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": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2015-03-19T22:56:34.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": "h1. Problem description\r\nCalling Ti.Android.getCurrentActivity() always fails with an exception in the logs.\r\n\r\n{code}\r\nE/TiJSError( 1288): (main) [2,1195] - Message: Uncaught TypeError: Object # has no method 'getCurrentService'\r\n{code}\r\n\r\nh1. Steps to reproduce\r\nUse this simple app to test:\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n backgroundColor:'#fff',\r\n fullscreen: true\r\n});\r\nwin1.open();\r\n\r\nTitanium.API.info(\"Activity: \" + Titanium.Android.getCurrentService());\r\n{code}\r\n\r\nChanging from getCurrentService() to currentService (direct access to the property) works fine.", "attachment": [], "flagged": false, "summary": "Android: Ti.Android.getCurrentService() fails with an exception", "creator": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Android\r\nSDK 2.1.4\r\nSDK 3.0.0", "closedSprints": [ { "id": 219, "state": "closed", "name": "2014 Sprint 19 SDK", "startDate": "2014-09-18T21:06:27.559Z", "endDate": "2014-09-27T00:00:00.000Z", "completeDate": "2014-09-29T13:58:58.022Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "324112", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/6109", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-16T23:59:30.000+0000", "updated": "2014-09-16T23:59:30.000+0000" }, { "id": "342937", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Both _Titanium.Android.getCurrentActivity()_ and _Titanium.Android.getCurrentService_ have been removed from the documentation.\r\n\r\n_Titanium.Android.currentActivity_ and _Titanium.Android.currentService_ should be used instead. This bug is because docgen automatically generates getter methods for properties even if the getter is not implemented.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-11T18:24:26.000+0000", "updated": "2015-02-11T18:24:26.000+0000" }, { "id": "346607", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in the docs yml files on github. Titanium.Android.getCurrentActivity() and Titanium.Android.getCurrentService are removed.\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 3.5.1.201412091616\r\nTi SDK : 4.0.0.v20150317234215\r\nCLI : 4.0.0-alpha\r\nAlloy : 1.6.0-alpha\r\nMAC Yosemite : 10.10.2", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-19T22:56:09.000+0000", "updated": "2015-03-19T22:56:28.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }