{ "id": "175545", "key": "TIMOB-28140", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-11-25T15:26:15.000+0000", "created": "2020-09-16T04:32:58.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "WebView", "android", "geolocation", "html", "permission" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-11-25T15:26:15.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": "*Summary:*\r\nWhen a WebView HTML's JavaScript uses the [Geolocation|https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API] web API, it should automatically prompt the end-user for permission on Android 6.0 and above.\r\n\r\nCurrently, permission will always be denied unless you call the [Ti.Geolocation.requestLocationPermissions()|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Geolocation-method-requestLocationPermissions] method yourself before loading the webpage.\r\n\r\n*Test Case:*\r\n# Create a Classic Titanium app project.\r\n# Add the below Android permission to the \"tiapp.xml\".\r\n# Use the below \"app.js\" code.\r\n# Build and run on Android 6.0 or higher.\r\n# Tap on the \"Your Location\" button in the map.\r\n# Verify a dialog appears asking you for permission. _(This is the feature we're adding.)_\r\n# Grant permission.\r\n# Verify map shows your current location.\r\n\r\ntiapp.xml\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\napp.js\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nwindow.add(Ti.UI.createWebView({\r\n\turl: 'https://maps.google.com',\r\n\tborderRadius: 1,\r\n}));\r\nwindow.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: WebView should request location permission when HTML uses geolocation API", "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": 1206, "state": "closed", "name": "2020 Sprint 19", "startDate": "2020-09-14T20:01:00.000Z", "endDate": "2020-09-25T20:01:00.000Z", "completeDate": "2020-09-28T15:30:19.875Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "456950", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12105", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-19T03:58:48.000+0000", "updated": "2020-09-19T03:58:48.000+0000" }, { "id": "457213", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "FR passed for this part of the PR", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2020-10-08T13:28:35.000+0000", "updated": "2020-10-08T13:29:15.000+0000" }, { "id": "457725", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*. Fix verified in SDK version {{9.3.0.v20201125050632}}.\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/12105", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-25T15:25:52.000+0000", "updated": "2020-11-25T15:25:52.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }