{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1620","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1620/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1620/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1620/events","html_url":"https://github.com/facebook/react-native/pull/1620","id":88144260,"number":1620,"title":"Add support for selecting media from library","user":{"login":"dvcrn","id":688326,"avatar_url":"https://avatars.githubusercontent.com/u/688326?v=3","gravatar_id":"","url":"https://api.github.com/users/dvcrn","html_url":"https://github.com/dvcrn","followers_url":"https://api.github.com/users/dvcrn/followers","following_url":"https://api.github.com/users/dvcrn/following{/other_user}","gists_url":"https://api.github.com/users/dvcrn/gists{/gist_id}","starred_url":"https://api.github.com/users/dvcrn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvcrn/subscriptions","organizations_url":"https://api.github.com/users/dvcrn/orgs","repos_url":"https://api.github.com/users/dvcrn/repos","events_url":"https://api.github.com/users/dvcrn/events{/privacy}","received_events_url":"https://api.github.com/users/dvcrn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20accepted","name":"GH Review: accepted","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-14T08:03:59Z","updated_at":"2016-01-16T07:43:35Z","closed_at":"2015-06-25T17:47:36Z","pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/1620","html_url":"https://github.com/facebook/react-native/pull/1620","diff_url":"https://github.com/facebook/react-native/pull/1620.diff","patch_url":"https://github.com/facebook/react-native/pull/1620.patch"},"body":"This PR adds support for UIImagePickerController to allow selecting a photo / video from the users camera roll. \r\n\r\n![ios simulator screen shot jun 14 2015 4 50 03 pm](https://cloud.githubusercontent.com/assets/688326/8147758/ae6dc8d4-12b6-11e5-80f0-2bcaa964a5d8.png)\r\n\r\nExample: \r\n\r\nSelecting something from camera roll\r\n```\r\nImagePickerIOS.openSelectDialog(<config>, <successCallback>, <cancelCallback>);\r\n\r\nImagePickerIOS.openSelectDialog({\r\n   showImages: true, // defaults to true\r\n   showVideos: false // defaults to false\r\n}, function (data) {\r\n  console.info(\"Got a callback!\");\r\n  console.info(data); // file URL as in assets-library://asset/asset.JPG?id=E2741A73-D185-44B6-A2E6-2D55F69CD088&ext=JPG\r\n}, function() {\r\n  console.info(\"Cancelled\");\r\n});\r\n```\r\n\r\nUsing camera\r\n```\r\nImagePickerIOS.openCameraDialog(<config>, <successCallback>, <cancelCallback>);\r\n\r\nImagePickerIOS.openSelectDialog({\r\n   videoMode: false, // defaults to true, whether to record videos instead\r\n}, function (data) {\r\n  console.info(\"Got a callback!\");\r\n  console.info(data); // file URL as in assets-library://asset/asset.JPG?id=E2741A73-D185-44B6-A2E6-2D55F69CD088&ext=JPG\r\n}, function() {\r\n  console.info(\"Cancelled\");\r\n});\r\n```\r\n\r\nI also implemented `canRecordVideos` and `canUseCamera` for devices that are either not capable of shooting a picture or video. \r\n```\r\nImagePickerIOS.canRecordVideos(callback);\r\nImagePickerIOS.canUseCamera(callback);\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/172169992","html_url":"https://github.com/facebook/react-native/pull/1620#issuecomment-172169992","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1620","id":172169992,"user":{"login":"dvcrn","id":688326,"avatar_url":"https://avatars.githubusercontent.com/u/688326?v=3","gravatar_id":"","url":"https://api.github.com/users/dvcrn","html_url":"https://github.com/dvcrn","followers_url":"https://api.github.com/users/dvcrn/followers","following_url":"https://api.github.com/users/dvcrn/following{/other_user}","gists_url":"https://api.github.com/users/dvcrn/gists{/gist_id}","starred_url":"https://api.github.com/users/dvcrn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvcrn/subscriptions","organizations_url":"https://api.github.com/users/dvcrn/orgs","repos_url":"https://api.github.com/users/dvcrn/repos","events_url":"https://api.github.com/users/dvcrn/events{/privacy}","received_events_url":"https://api.github.com/users/dvcrn/received_events","type":"User","site_admin":false},"created_at":"2016-01-16T07:43:35Z","updated_at":"2016-01-16T07:43:35Z","body":"@wootwoot1234 I'm very limited on time these days. I'll try to take a look at it but no promises. \r\nIn the meantime, feel free to try it yourself :smile: RN is actually quite simple"}}