{"action":"closed","number":302,"pull_request":{"url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls/302","id":66900678,"html_url":"https://github.com/Redth/ZXing.Net.Mobile/pull/302","diff_url":"https://github.com/Redth/ZXing.Net.Mobile/pull/302.diff","patch_url":"https://github.com/Redth/ZXing.Net.Mobile/pull/302.patch","issue_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/302","number":302,"state":"closed","locked":false,"title":"Moved surface create/change code back into normal lifecycle","user":{"login":"Redth","id":271950,"avatar_url":"https://avatars.githubusercontent.com/u/271950?v=3","gravatar_id":"","url":"https://api.github.com/users/Redth","html_url":"https://github.com/Redth","followers_url":"https://api.github.com/users/Redth/followers","following_url":"https://api.github.com/users/Redth/following{/other_user}","gists_url":"https://api.github.com/users/Redth/gists{/gist_id}","starred_url":"https://api.github.com/users/Redth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Redth/subscriptions","organizations_url":"https://api.github.com/users/Redth/orgs","repos_url":"https://api.github.com/users/Redth/repos","events_url":"https://api.github.com/users/Redth/events{/privacy}","received_events_url":"https://api.github.com/users/Redth/received_events","type":"User","site_admin":false},"body":"The SurfaceCreated and SurfaceChanged are the ideal places to handle the camera and preview setup, however if the code only lives there, it's impossible to restart the camera after it has been stopped unless the surface is destroyed and recreated.\r\n\r\nThis refactors the setup out into methods that can be called from SurfaceCreated and SurfaceChanged, but also from outside of these (eg: StartScanning).  This way we can stop scanning and restart it without recreating the surface.  The StartScanning method will check to ensure SurfaceCreated and SurfaceChanged have already been called before running the setup again, to ensure it's not the first caller to them.\r\n\r\nThis should manually merge the intent of #286 ","created_at":"2016-04-18T18:37:34Z","updated_at":"2016-04-18T18:37:46Z","closed_at":"2016-04-18T18:37:46Z","merged_at":"2016-04-18T18:37:46Z","merge_commit_sha":"ff9dcadc0a1a8e6a4151e901d5629f19ff5fc022","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls/302/commits","review_comments_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls/302/comments","review_comment_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/302/comments","statuses_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/statuses/846744ab1cbc4124b25e883c5d9c6ff8dabf92be","head":{"label":"Redth:android-view-lifecycle","ref":"android-view-lifecycle","sha":"846744ab1cbc4124b25e883c5d9c6ff8dabf92be","user":{"login":"Redth","id":271950,"avatar_url":"https://avatars.githubusercontent.com/u/271950?v=3","gravatar_id":"","url":"https://api.github.com/users/Redth","html_url":"https://github.com/Redth","followers_url":"https://api.github.com/users/Redth/followers","following_url":"https://api.github.com/users/Redth/following{/other_user}","gists_url":"https://api.github.com/users/Redth/gists{/gist_id}","starred_url":"https://api.github.com/users/Redth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Redth/subscriptions","organizations_url":"https://api.github.com/users/Redth/orgs","repos_url":"https://api.github.com/users/Redth/repos","events_url":"https://api.github.com/users/Redth/events{/privacy}","received_events_url":"https://api.github.com/users/Redth/received_events","type":"User","site_admin":false},"repo":{"id":6160673,"name":"ZXing.Net.Mobile","full_name":"Redth/ZXing.Net.Mobile","owner":{"login":"Redth","id":271950,"avatar_url":"https://avatars.githubusercontent.com/u/271950?v=3","gravatar_id":"","url":"https://api.github.com/users/Redth","html_url":"https://github.com/Redth","followers_url":"https://api.github.com/users/Redth/followers","following_url":"https://api.github.com/users/Redth/following{/other_user}","gists_url":"https://api.github.com/users/Redth/gists{/gist_id}","starred_url":"https://api.github.com/users/Redth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Redth/subscriptions","organizations_url":"https://api.github.com/users/Redth/orgs","repos_url":"https://api.github.com/users/Redth/repos","events_url":"https://api.github.com/users/Redth/events{/privacy}","received_events_url":"https://api.github.com/users/Redth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Redth/ZXing.Net.Mobile","description":"Zxing Barcode Scanning Library for MonoTouch, Mono for Android, and Windows Phone","fork":false,"url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile","forks_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/forks","keys_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/teams","hooks_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/hooks","issue_events_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/events{/number}","events_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/events","assignees_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/assignees{/user}","branches_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/branches{/branch}","tags_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/tags","blobs_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/languages","stargazers_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/stargazers","contributors_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/contributors","subscribers_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/subscribers","subscription_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/subscription","commits_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/contents/{+path}","compare_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/merges","archive_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/downloads","issues_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues{/number}","pulls_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/labels{/name}","releases_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/releases{/id}","deployments_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/deployments","created_at":"2012-10-10T16:45:12Z","updated_at":"2016-04-16T04:54:32Z","pushed_at":"2016-04-18T18:37:46Z","git_url":"git://github.com/Redth/ZXing.Net.Mobile.git","ssh_url":"git@github.com:Redth/ZXing.Net.Mobile.git","clone_url":"https://github.com/Redth/ZXing.Net.Mobile.git","svn_url":"https://github.com/Redth/ZXing.Net.Mobile","homepage":null,"size":14391,"stargazers_count":241,"watchers_count":241,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":220,"mirror_url":null,"open_issues_count":49,"forks":220,"open_issues":49,"watchers":241,"default_branch":"master"}},"base":{"label":"Redth:master","ref":"master","sha":"e85ad5e3fb84fe77d17bcd4c50a7069e64b3cc3b","user":{"login":"Redth","id":271950,"avatar_url":"https://avatars.githubusercontent.com/u/271950?v=3","gravatar_id":"","url":"https://api.github.com/users/Redth","html_url":"https://github.com/Redth","followers_url":"https://api.github.com/users/Redth/followers","following_url":"https://api.github.com/users/Redth/following{/other_user}","gists_url":"https://api.github.com/users/Redth/gists{/gist_id}","starred_url":"https://api.github.com/users/Redth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Redth/subscriptions","organizations_url":"https://api.github.com/users/Redth/orgs","repos_url":"https://api.github.com/users/Redth/repos","events_url":"https://api.github.com/users/Redth/events{/privacy}","received_events_url":"https://api.github.com/users/Redth/received_events","type":"User","site_admin":false},"repo":{"id":6160673,"name":"ZXing.Net.Mobile","full_name":"Redth/ZXing.Net.Mobile","owner":{"login":"Redth","id":271950,"avatar_url":"https://avatars.githubusercontent.com/u/271950?v=3","gravatar_id":"","url":"https://api.github.com/users/Redth","html_url":"https://github.com/Redth","followers_url":"https://api.github.com/users/Redth/followers","following_url":"https://api.github.com/users/Redth/following{/other_user}","gists_url":"https://api.github.com/users/Redth/gists{/gist_id}","starred_url":"https://api.github.com/users/Redth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Redth/subscriptions","organizations_url":"https://api.github.com/users/Redth/orgs","repos_url":"https://api.github.com/users/Redth/repos","events_url":"https://api.github.com/users/Redth/events{/privacy}","received_events_url":"https://api.github.com/users/Redth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Redth/ZXing.Net.Mobile","description":"Zxing Barcode Scanning Library for MonoTouch, Mono for Android, and Windows Phone","fork":false,"url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile","forks_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/forks","keys_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/teams","hooks_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/hooks","issue_events_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/events{/number}","events_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/events","assignees_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/assignees{/user}","branches_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/branches{/branch}","tags_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/tags","blobs_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/languages","stargazers_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/stargazers","contributors_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/contributors","subscribers_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/subscribers","subscription_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/subscription","commits_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/contents/{+path}","compare_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/merges","archive_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/downloads","issues_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues{/number}","pulls_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/labels{/name}","releases_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/releases{/id}","deployments_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/deployments","created_at":"2012-10-10T16:45:12Z","updated_at":"2016-04-16T04:54:32Z","pushed_at":"2016-04-18T18:37:46Z","git_url":"git://github.com/Redth/ZXing.Net.Mobile.git","ssh_url":"git@github.com:Redth/ZXing.Net.Mobile.git","clone_url":"https://github.com/Redth/ZXing.Net.Mobile.git","svn_url":"https://github.com/Redth/ZXing.Net.Mobile","homepage":null,"size":14391,"stargazers_count":241,"watchers_count":241,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":220,"mirror_url":null,"open_issues_count":49,"forks":220,"open_issues":49,"watchers":241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls/302"},"html":{"href":"https://github.com/Redth/ZXing.Net.Mobile/pull/302"},"issue":{"href":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/302"},"comments":{"href":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/302/comments"},"review_comments":{"href":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls/302/comments"},"review_comment":{"href":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/pulls/302/commits"},"statuses":{"href":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/statuses/846744ab1cbc4124b25e883c5d9c6ff8dabf92be"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Redth","id":271950,"avatar_url":"https://avatars.githubusercontent.com/u/271950?v=3","gravatar_id":"","url":"https://api.github.com/users/Redth","html_url":"https://github.com/Redth","followers_url":"https://api.github.com/users/Redth/followers","following_url":"https://api.github.com/users/Redth/following{/other_user}","gists_url":"https://api.github.com/users/Redth/gists{/gist_id}","starred_url":"https://api.github.com/users/Redth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Redth/subscriptions","organizations_url":"https://api.github.com/users/Redth/orgs","repos_url":"https://api.github.com/users/Redth/repos","events_url":"https://api.github.com/users/Redth/events{/privacy}","received_events_url":"https://api.github.com/users/Redth/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":162,"deletions":141,"changed_files":2}}