{ "id": "174672", "key": "TIMOB-27739", "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": "20033", "name": "Release 9.0.0", "archived": false, "released": true, "releaseDate": "2020-03-18" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-01-30T23:58:21.000+0000", "created": "2020-01-25T05:05:12.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "build", "geolocation", "location", "permission", "regression" ], "versions": [ { "id": "20033", "name": "Release 9.0.0", "archived": false, "released": true, "releaseDate": "2020-03-18" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-30T23:58:21.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": "_This issue was caught before release._\r\n\r\n*Summary:*\r\nWhen doing a \"device\" or \"production\" build, Titanium's build system is supposed to auto-add the below permissions to the \"AndroidManifest.xml\" when the app uses the {{Ti.Geolocation}} APIs.\r\n* {{android.permission.ACCESS_COARSE_LOCATION}}\r\n* {{android.permission.ACCESS_FINE_LOCATION}}\r\n\r\nThis has stopped working as of Titanium 9.0.0 (before release).\r\n\r\n*Steps to reproduce:*\r\n# Set up a Classic app with the below code.\r\n# Build and run on an Android device. (Not an emulator.)\r\n# Notice app reports error: {{Failed to acquire location permission}}\r\n\r\napp.js\r\n{code:javascript}\r\nfunction monitorLocation() {\r\n\tfunction start() {\r\n\t\tTi.Geolocation.addEventListener(\"location\", function(e) {\r\n\t\t\tlabel.text = JSON.stringify(e, null, 4);\r\n\t\t\tTi.API.info(\"@@@ location received: \" + JSON.stringify(e));\r\n\t\t});\r\n\t}\r\n\tvar hasPermission = Ti.Geolocation.hasLocationPermissions(Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE);\r\n\tif (!hasPermission) {\r\n\t\tTi.Geolocation.requestLocationPermissions(Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE, function(e) {\r\n\t\t\tTi.API.info(\"@@@ permission result: \" + JSON.stringify(e));\r\n\t\t\tif (e.success) {\r\n\t\t\t\tstart();\r\n\t\t\t} else {\r\n\t\t\t\tlabel.text = \"\\nFailed to acquire location permission from end-user.\";\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tstart();\r\n\t}\r\n}\r\nvar window = Ti.UI.createWindow();\r\nvar scrollView = Ti.UI.createScrollView({\r\n\tlayout: \"vertical\",\r\n\tscrollType: \"vertical\",\r\n\twidth: Ti.UI.FILL,\r\n\theight: Ti.UI.FILL,\r\n});\r\nvar label = Ti.UI.createLabel({\r\n\ttext: \"\\nWaiting for GPS data...\",\r\n\ttop: (Ti.App.iOS ? \"25dp\" : \"5dp\"),\r\n\theight: Ti.UI.SIZE,\r\n\tleft: \"5dp\",\r\n\tright: \"5dp\",\r\n\tbottom: \"5dp\",\r\n});\r\nscrollView.add(label);\r\nwindow.add(scrollView);\r\nwindow.addEventListener(\"open\", function(e) {\r\n\tmonitorLocation();\r\n});\r\nwindow.open();\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Location permissions not auto-added when using Ti.Geolocation API as of 9.0.0", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1177, "state": "closed", "name": "2020 Sprint 2", "startDate": "2020-01-20T17:44:37.733Z", "endDate": "2020-01-31T17:44:00.000Z", "completeDate": "2020-01-31T16:57:44.689Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "453818", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/11450", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-25T05:23:17.000+0000", "updated": "2020-01-25T05:23:17.000+0000" }, { "id": "453834", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for Jenkins.", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-27T22:48:21.000+0000", "updated": "2020-01-27T22:48:21.000+0000" }, { "id": "453935", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master for 9.0.0", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-01-30T15:58:12.000+0000", "updated": "2020-01-30T15:58:12.000+0000" }, { "id": "453961", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nMac OS: 10.15.1\r\nSDK: 9.0.0.v20200130113429\r\nAppc CLI: 7.1.2\r\nJDK: 11.0.4\r\nNode: 10.16.3\r\nStudio: 6.0.0.201911251516\r\nDevice: Pixel3(v9.0) device, Pixel3(v10.0) emulator", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-30T23:58:21.000+0000", "updated": "2020-01-30T23:58:21.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }