{ "id": "153825", "key": "TIMOB-20144", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2016-04-21T04:33:14.000+0000", "created": "2015-12-14T15:26:42.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android" ], "versions": [], "issuelinks": [ { "id": "50446", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "154687", "key": "TIMOB-20320", "fields": { "summary": "Android: Provide generic requestPermission(s) method", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T20:49:40.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": "With the new Android 6 permissions mechanism, native modules should be able to request runtime permissions outside of the ones exposed by the Ti API (camera, calendar, location and contacts). For example, a native module for sending SMS messages would need to request the SEND_SMS permission at runtime, however it would have no means to get notified about the result of the operation.\r\nI would propose to extend the TiBaseActivity class with a mechanism allowing native modules to register a listener, in order to be notified when the onRequestPermissionsResult method of the current activity is called (see https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/TiBaseActivity.java#L447)", "attachment": [], "flagged": false, "summary": "Android 6.0: allow native modules to get notified about runtime permission granting results", "creator": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Android 6 \r\nTi SDK 5.1.1.GA", "closedSprints": [ { "id": 624, "state": "closed", "name": "2016 Sprint 09 SDK", "startDate": "2016-04-23T00:39:45.452Z", "endDate": "2016-05-07T00:39:00.000Z", "completeDate": "2016-05-09T03:43:10.279Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "372829", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Maybe we can think of a way which would also allow us to dump the {{createActivityWorker()}} we currently [require for our Android FB module|https://github.com/appcelerator-modules/ti.facebook#proxy-required-per-android-activity] as well? Since I think both our related to being able to hook into the current activity?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-14T15:31:49.000+0000", "updated": "2015-12-14T15:31:49.000+0000" }, { "id": "375300", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~cng] related to TIMOB-20235, I thought we also had a ticket requesting a generic method ({{Ti.Android.requestPermission}}) to request any permission that we resolved as _Invalid_ / _Won't Fix_ because we thought any module that needed additional permission should provide ways to request this via the module, which is what this ticket is about.\r\n\r\nAnyway, I think it might be better to have that generic method after all. That way, modules only need to list what permission you should request and we won't end up with modules that have different method names/ways to request these. Also, you would prevent situations where 2 modules overlap in the permissions they need and if they don't properly handle the case where only some of the permissions were already granted (which we had ourselves with camera on android) it can get ugly.\r\n\r\nWhat do you think?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-01-26T18:12:21.000+0000", "updated": "2016-01-26T18:12:21.000+0000" }, { "id": "375891", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I've created TIMOB-20320 to request a generic method.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-02-03T17:23:34.000+0000", "updated": "2016-02-03T17:23:34.000+0000" }, { "id": "383465", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "I resolved this as duplicate as TIMOB-20320 has addressed this.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-21T04:33:34.000+0000", "updated": "2016-04-21T04:33:34.000+0000" }, { "id": "414922", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate of the ticket that is mentioned above and has since been closed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T20:49:40.000+0000", "updated": "2017-03-22T20:49:40.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }