{ "id": "108491", "key": "TIMOB-12411", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2015-02-28T15:42:51.000+0000", "created": "2013-01-24T11:29:38.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "qe-4.0.0" ], "versions": [], "issuelinks": [ { "id": "41214", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "136685", "key": "TIMOB-17711", "fields": { "summary": "Android: Ti.Android.getCurrentService() 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": "45884", "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-03T22:45:35.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 'getCurrentActivity'\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.getCurrentActivity());\r\n{code}\r\n\r\nChanging from getCurrentActivity() to currentActivity (direct access to the property) works fine.", "attachment": [], "flagged": false, "summary": "Android: Ti.Android.getCurrentActivity() fails with an exception", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "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": 356, "state": "closed", "name": "2015 Sprint 05 SDK", "startDate": "2015-02-28T15:50:08.527Z", "endDate": "2015-03-14T00:00:00.000Z", "completeDate": "2015-03-14T13:54:50.695Z", "originBoardId": 114 }, { "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": "324111", "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:07.000+0000", "updated": "2014-09-16T23:59:07.000+0000" }, { "id": "342522", "author": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Verified with below Test Environment:\r\n1. Mac OSX Yosemite 10.10\r\n2. Appcelerator Studio, build: 4.0.0.201502041613\r\n3. Titanium SDK, build: 4.0.0.v20150206131709\r\n4. Titanium CLI, build: 3.6.0-dev\r\n5. Alloy: 1.5.1\r\n6. S Galaxy S5 with Android 4.4.2\r\n\r\nStill seeing the same exception on the console.\r\n\r\n[ERROR] : TiExceptionHandler: (main) [0,81] - Message: Uncaught TypeError: Object # has no method 'getCurrentActivity'\r\n[ERROR] : TiExceptionHandler: (main) [0,81] - Source: Titanium.API.info(\"Activity: \" + Titanium.Android.getCurrentActivity());\r\n\r\nSo reopening the ticket.", "updateAuthor": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2015-02-09T11:08:54.000+0000", "updated": "2015-02-09T11:08:54.000+0000" }, { "id": "342935", "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:23:45.000+0000", "updated": "2015-02-11T18:23:45.000+0000" }, { "id": "344701", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving as a duplicate of TIDOC-2124 as when that is fixed, it will address this issue as well.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-28T15:42:51.000+0000", "updated": "2015-02-28T15:42:51.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }