{ "id": "150791", "key": "TIMOB-19422", "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": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-09-07T05:06:21.000+0000", "created": "2015-08-28T04:13:16.000+0000", "epic": { "id": 150513, "key": "TIMOB-19371", "name": "Android: Android M Updates", "summary": "Android: Android M Updates", "color": { "key": "color_5" }, "done": false }, "priority": { "name": "Critical", "id": "1" }, "labels": [ "camera", "permissions" ], "versions": [], "issuelinks": [ { "id": "49165", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "151650", "key": "TIMOB-19654", "fields": { "summary": "Android: Error accessing Camera on device below M", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "48940", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "151080", "key": "TIMOB-19490", "fields": { "summary": "Android: Error when accessing Actionbar", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "48974", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "151140", "key": "TIMOB-19504", "fields": { "summary": "Android: org.appcelerator.titanium.TiActivity cannot be cast to android.support.v7.app.ActionBarActivity", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2015-10-27T01:03:33.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": "The problem is, the app doesn't prompt the user for permissions, and even if the permissions are set, the app crashes.\r\n\r\nh4. Steps to reproduce:\r\n1. Use the sample app\r\n2. ti build\r\n3. it will show an error\r\n4. Go to settings permissions, set the app permission such that storage = YES, camera = NO\r\n5. App will crash\r\n\r\n*Note* if both permissions are set to YES MANUALLY like (4.), the app works.\r\n\r\n{code}\r\nTitanium.Media.showCamera({\r\n\tsuccess:function(event) {\r\n\t\t// called when media returned from the camera\r\n\t\tTi.API.debug('Our type was: '+event.mediaType);\r\n\t\tif(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\r\n\t\t\tvar imageView = Ti.UI.createImageView({\r\n\t\t\t\twidth:win.width,\r\n\t\t\t\theight:win.height,\r\n\t\t\t\timage:event.media\r\n\t\t\t});\r\n\t\t\twin.add(imageView);\r\n\t\t} else {\r\n\t\t\talert(\"got the wrong type back =\"+event.mediaType);\r\n\t\t}\r\n\t},\r\n\tcancel:function() {\r\n\t\t// called when user cancels taking a picture\r\n\t},\r\n\terror:function(error) {\r\n\t\t// called when there's an error\r\n\t\tvar a = Titanium.UI.createAlertDialog({title:'Camera'});\r\n\t\ta.setMessage(JSON.stringify(error));\r\n\t\ta.show();\r\n\t},\r\n\tsaveToPhotoGallery:true\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "Android M: App crashes if using camera in device due to permissions", "creator": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Nexus 5\r\nAndroid Version 6", "closedSprints": [ { "id": 481, "state": "closed", "name": "2015 Sprint 18 SDK", "startDate": "2015-08-29T00:30:25.440Z", "endDate": "2015-09-12T00:30:00.000Z", "completeDate": "2015-09-14T05:24:05.135Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "361553", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-28T04:19:22.000+0000", "updated": "2015-08-28T04:19:22.000+0000" }, { "id": "361692", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Useful commands for testing:-\r\nFrom terminal, to grant permission instead of going to Settings in phone.\r\n{code}\r\nadb shell pm grant com.titanium.test android.permission.CAMERA\r\n{code}\r\n\r\nFrom terminal, to revoke permission instead of going to Settings in phone.\r\n{code}\r\nadb shell pm revoke com.titanium.test android.permission.CAMERA\r\n{code}", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-08-31T05:02:07.000+0000", "updated": "2015-08-31T05:02:07.000+0000" }, { "id": "362328", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/7125. This PR check permissions and exit gracefully (no-op) if permission is not granted.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-04T19:03:11.000+0000", "updated": "2015-09-04T19:04:37.000+0000" }, { "id": "362397", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Master PR and backport pr merged.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-07T05:06:37.000+0000", "updated": "2015-09-07T05:06:37.000+0000" }, { "id": "362600", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "5_0_X revert https://github.com/appcelerator/titanium_mobile/pull/7149", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-08T23:48:24.000+0000", "updated": "2015-09-08T23:48:24.000+0000" }, { "id": "363730", "author": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is still broken in the latest version from master.\r\n\r\nversion:\r\n5.1.0\r\ngit hash:\r\nae65d5dd2d48289604d29d4be25607acfa1eab80\r\njenkins:\r\nJob #4515\r\nparity:\r\nparity repor", "updateAuthor": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-14T03:02:28.000+0000", "updated": "2015-09-14T03:02:28.000+0000" }, { "id": "363731", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-14T03:05:46.000+0000", "updated": "2015-09-14T03:05:46.000+0000" }, { "id": "363734", "author": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirmed 5.0.0.v20150911123911 is working. Will test master once it goes through the build cycle.\r\n\r\n", "updateAuthor": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-14T03:12:33.000+0000", "updated": "2015-09-14T03:12:33.000+0000" }, { "id": "363736", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~ben.bahrenburg@gmail.com] Thanks!", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-14T03:21:36.000+0000", "updated": "2015-09-14T03:21:36.000+0000" }, { "id": "367903", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix. The app does not crash but,\r\n1. If filesystem permission is granted & camera permission not granted. The app does nothing.\r\n2. If camera permission is granted & filesystem permission not granted. The app does nothing.\r\n3. If both the permissions are granted the app performs as normal.\r\n\r\nClosing\r\n\r\nEnvironment:\r\nAppc Studio : 4.4.0.201510231805\r\nTi SDK : 5.1.0.v20151022152020\r\nTi CLI : 5.0.5\r\nAlloy : 1.7.18\r\nMAC Yosemite : 10.10.5\r\nAppc NPM : 4.2.1-6\r\nAppc CLI : 5.1.0-38\r\nNode: v0.10.37\r\nNexus 5 - Android 6.0", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-27T01:02:51.000+0000", "updated": "2015-10-27T01:02:51.000+0000" } ], "maxResults": 17, "total": 17, "startAt": 0 } } }