{"action":"opened","number":10221,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/10221","id":87696212,"html_url":"https://github.com/facebook/react-native/pull/10221","diff_url":"https://github.com/facebook/react-native/pull/10221.diff","patch_url":"https://github.com/facebook/react-native/pull/10221.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/10221","number":10221,"state":"open","locked":false,"title":"[PermissionsAndroid] Handle \"Never Ask Again\" in permissions and add requestMultiplePermissions","user":{"login":"cmcewen","id":1307633,"avatar_url":"https://avatars.githubusercontent.com/u/1307633?v=3","gravatar_id":"","url":"https://api.github.com/users/cmcewen","html_url":"https://github.com/cmcewen","followers_url":"https://api.github.com/users/cmcewen/followers","following_url":"https://api.github.com/users/cmcewen/following{/other_user}","gists_url":"https://api.github.com/users/cmcewen/gists{/gist_id}","starred_url":"https://api.github.com/users/cmcewen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmcewen/subscriptions","organizations_url":"https://api.github.com/users/cmcewen/orgs","repos_url":"https://api.github.com/users/cmcewen/repos","events_url":"https://api.github.com/users/cmcewen/events{/privacy}","received_events_url":"https://api.github.com/users/cmcewen/received_events","type":"User","site_admin":false},"body":"In order to get feature in the Google Play Store, we had to handle a few specific cases with permissions based on feedback from the editorial team.\r\n\r\nFirst, which was previously possible with this permissions module was bumping the sdk to version 23.\r\n\r\nThe second is requesting multiple permissions at one time. In order for the camera + upload to work, we needed to request both camera permissions + media storage in one flow.\r\n\r\nThe last is handling the case where the user checks the \"Never Ask Again\" box. This will only appear after a user denies a permission once and is then prompted again. The logic for handling this case is taken from here: http://stackoverflow.com/questions/31928868/how-do-we-distinguish-never-asked-from-stop-asking-in-android-ms-runtime-permis/35495372#35495372\r\n\r\nWe were also seeing a few crashes similar to #10009 due to `onRequestPermissionsResult` being called before `onResume` (http://stackoverflow.com/questions/35205643/why-is-onresume-called-after-onrequestpermissionsresult), so I delayed the handling using a callback.","created_at":"2016-10-03T10:49:14Z","updated_at":"2016-10-03T10:49:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/10221/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/10221/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/10221/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/5b0c28c308a59902afe6dc6ec2d4edb3fccff43b","head":{"label":"cmcewen:permissions-update","ref":"permissions-update","sha":"5b0c28c308a59902afe6dc6ec2d4edb3fccff43b","user":{"login":"cmcewen","id":1307633,"avatar_url":"https://avatars.githubusercontent.com/u/1307633?v=3","gravatar_id":"","url":"https://api.github.com/users/cmcewen","html_url":"https://github.com/cmcewen","followers_url":"https://api.github.com/users/cmcewen/followers","following_url":"https://api.github.com/users/cmcewen/following{/other_user}","gists_url":"https://api.github.com/users/cmcewen/gists{/gist_id}","starred_url":"https://api.github.com/users/cmcewen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmcewen/subscriptions","organizations_url":"https://api.github.com/users/cmcewen/orgs","repos_url":"https://api.github.com/users/cmcewen/repos","events_url":"https://api.github.com/users/cmcewen/events{/privacy}","received_events_url":"https://api.github.com/users/cmcewen/received_events","type":"User","site_admin":false},"repo":{"id":34361848,"name":"react-native","full_name":"cmcewen/react-native","owner":{"login":"cmcewen","id":1307633,"avatar_url":"https://avatars.githubusercontent.com/u/1307633?v=3","gravatar_id":"","url":"https://api.github.com/users/cmcewen","html_url":"https://github.com/cmcewen","followers_url":"https://api.github.com/users/cmcewen/followers","following_url":"https://api.github.com/users/cmcewen/following{/other_user}","gists_url":"https://api.github.com/users/cmcewen/gists{/gist_id}","starred_url":"https://api.github.com/users/cmcewen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmcewen/subscriptions","organizations_url":"https://api.github.com/users/cmcewen/orgs","repos_url":"https://api.github.com/users/cmcewen/repos","events_url":"https://api.github.com/users/cmcewen/events{/privacy}","received_events_url":"https://api.github.com/users/cmcewen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cmcewen/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/cmcewen/react-native","forks_url":"https://api.github.com/repos/cmcewen/react-native/forks","keys_url":"https://api.github.com/repos/cmcewen/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cmcewen/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cmcewen/react-native/teams","hooks_url":"https://api.github.com/repos/cmcewen/react-native/hooks","issue_events_url":"https://api.github.com/repos/cmcewen/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/cmcewen/react-native/events","assignees_url":"https://api.github.com/repos/cmcewen/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/cmcewen/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/cmcewen/react-native/tags","blobs_url":"https://api.github.com/repos/cmcewen/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cmcewen/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cmcewen/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/cmcewen/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cmcewen/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/cmcewen/react-native/languages","stargazers_url":"https://api.github.com/repos/cmcewen/react-native/stargazers","contributors_url":"https://api.github.com/repos/cmcewen/react-native/contributors","subscribers_url":"https://api.github.com/repos/cmcewen/react-native/subscribers","subscription_url":"https://api.github.com/repos/cmcewen/react-native/subscription","commits_url":"https://api.github.com/repos/cmcewen/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/cmcewen/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/cmcewen/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/cmcewen/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/cmcewen/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/cmcewen/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cmcewen/react-native/merges","archive_url":"https://api.github.com/repos/cmcewen/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cmcewen/react-native/downloads","issues_url":"https://api.github.com/repos/cmcewen/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/cmcewen/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/cmcewen/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/cmcewen/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cmcewen/react-native/labels{/name}","releases_url":"https://api.github.com/repos/cmcewen/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/cmcewen/react-native/deployments","created_at":"2015-04-22T01:36:50Z","updated_at":"2016-06-30T04:22:18Z","pushed_at":"2016-10-03T10:36:19Z","git_url":"git://github.com/cmcewen/react-native.git","ssh_url":"git@github.com:cmcewen/react-native.git","clone_url":"https://github.com/cmcewen/react-native.git","svn_url":"https://github.com/cmcewen/react-native","homepage":"http://facebook.github.io/react-native/","size":55376,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"a1402511f501fdaf51e6bacde2152cc40e310de4","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29028775,"name":"react-native","full_name":"facebook/react-native","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react-native/deployments","created_at":"2015-01-09T18:10:16Z","updated_at":"2016-10-03T10:45:35Z","pushed_at":"2016-10-03T10:49:15Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"http://facebook.github.io/react-native/","size":134158,"stargazers_count":38406,"watchers_count":38406,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8550,"mirror_url":null,"open_issues_count":1326,"forks":8550,"open_issues":1326,"watchers":38406,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/10221"},"html":{"href":"https://github.com/facebook/react-native/pull/10221"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/10221"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/10221/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/10221/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/10221/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/5b0c28c308a59902afe6dc6ec2d4edb3fccff43b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":147,"deletions":38,"changed_files":6}}
{"actor":{"display_login":"cmcewen"}}