{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/comments/32921498","id":32921498,"diff_hunk":"@@ -163,7 +159,19 @@ else if ((srcType == PHOTOLIBRARY) || (srcType == SAVEDPHOTOALBUM)) {\n             PluginResult r = new PluginResult(PluginResult.Status.NO_RESULT);\n             r.setKeepCallback(true);\n             callbackContext.sendPluginResult(r);\n-            \n+\n+            return true;\n+        } else if (action.equals(\"checkForSavedResult\")) {\n+            if (savedRequestCode > 0 || savedResultCode > 0) {\n+                processConfiguration(args);\n+                imageUri = Uri.fromFile(createCaptureFile(encodingType));\n+                onActivityResult(savedRequestCode, savedResultCode, savedIntent);\n+                savedRequestCode = 0;\n+                savedResultCode = 0;\n+                savedIntent = null;\n+            } else {\n+                callbackContext.success(\"\");","path":"src/android/CameraLauncher.java","position":46,"original_position":46,"commit_id":"381cc602d61a23f501f39a6acdd54e4e4a64ac91","original_commit_id":"381cc602d61a23f501f39a6acdd54e4e4a64ac91","user":{"login":"thehuijb","id":902441,"avatar_url":"https://avatars.githubusercontent.com/u/902441?v=3","gravatar_id":"","url":"https://api.github.com/users/thehuijb","html_url":"https://github.com/thehuijb","followers_url":"https://api.github.com/users/thehuijb/followers","following_url":"https://api.github.com/users/thehuijb/following{/other_user}","gists_url":"https://api.github.com/users/thehuijb/gists{/gist_id}","starred_url":"https://api.github.com/users/thehuijb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehuijb/subscriptions","organizations_url":"https://api.github.com/users/thehuijb/orgs","repos_url":"https://api.github.com/users/thehuijb/repos","events_url":"https://api.github.com/users/thehuijb/events{/privacy}","received_events_url":"https://api.github.com/users/thehuijb/received_events","type":"User","site_admin":false},"body":"one should only return an error when an error occurs.\r\n@agrieve advised me to callback success with empty string so you can handle the result in onSuccess javascript like so:\r\n`if (result) {\r\n  //do something\r\n}`\r\n\r\n","created_at":"2015-06-22T10:35:29Z","updated_at":"2015-06-22T10:35:29Z","html_url":"https://github.com/apache/cordova-plugin-camera/pull/97#discussion_r32921498","pull_request_url":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/97","_links":{"self":{"href":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/comments/32921498"},"html":{"href":"https://github.com/apache/cordova-plugin-camera/pull/97#discussion_r32921498"},"pull_request":{"href":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/97"}}},"pull_request":{"url":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/97","id":35919990,"html_url":"https://github.com/apache/cordova-plugin-camera/pull/97","diff_url":"https://github.com/apache/cordova-plugin-camera/pull/97.diff","patch_url":"https://github.com/apache/cordova-plugin-camera/pull/97.patch","issue_url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/97","number":97,"state":"open","locked":false,"title":"CB-8804 implement check for saved result","user":{"login":"thehuijb","id":902441,"avatar_url":"https://avatars.githubusercontent.com/u/902441?v=3","gravatar_id":"","url":"https://api.github.com/users/thehuijb","html_url":"https://github.com/thehuijb","followers_url":"https://api.github.com/users/thehuijb/followers","following_url":"https://api.github.com/users/thehuijb/following{/other_user}","gists_url":"https://api.github.com/users/thehuijb/gists{/gist_id}","starred_url":"https://api.github.com/users/thehuijb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehuijb/subscriptions","organizations_url":"https://api.github.com/users/thehuijb/orgs","repos_url":"https://api.github.com/users/thehuijb/repos","events_url":"https://api.github.com/users/thehuijb/events{/privacy}","received_events_url":"https://api.github.com/users/thehuijb/received_events","type":"User","site_admin":false},"body":"Android uses intents to launch the camera activity on the device to capture images, and on phones with low memory, the Cordova activity may be killed.  \r\nIn this scenario, the image may not appear when the Cordova activity is restored.\r\n\r\nOnce our MainActivity restarts you should call the checkForSavedResult method in onDeviceReady to see if there is a result present from a previous call to getPicture.","created_at":"2015-05-21T10:29:18Z","updated_at":"2015-06-22T10:35:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6733c88de14e057f4493f3b99465dadd4c70249","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/97/commits","review_comments_url":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/97/comments","review_comment_url":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/97/comments","statuses_url":"https://api.github.com/repos/apache/cordova-plugin-camera/statuses/381cc602d61a23f501f39a6acdd54e4e4a64ac91","head":{"label":"thehuijb:feature/checkSavedResult","ref":"feature/checkSavedResult","sha":"381cc602d61a23f501f39a6acdd54e4e4a64ac91","user":{"login":"thehuijb","id":902441,"avatar_url":"https://avatars.githubusercontent.com/u/902441?v=3","gravatar_id":"","url":"https://api.github.com/users/thehuijb","html_url":"https://github.com/thehuijb","followers_url":"https://api.github.com/users/thehuijb/followers","following_url":"https://api.github.com/users/thehuijb/following{/other_user}","gists_url":"https://api.github.com/users/thehuijb/gists{/gist_id}","starred_url":"https://api.github.com/users/thehuijb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehuijb/subscriptions","organizations_url":"https://api.github.com/users/thehuijb/orgs","repos_url":"https://api.github.com/users/thehuijb/repos","events_url":"https://api.github.com/users/thehuijb/events{/privacy}","received_events_url":"https://api.github.com/users/thehuijb/received_events","type":"User","site_admin":false},"repo":{"id":31003693,"name":"cordova-plugin-camera","full_name":"thehuijb/cordova-plugin-camera","owner":{"login":"thehuijb","id":902441,"avatar_url":"https://avatars.githubusercontent.com/u/902441?v=3","gravatar_id":"","url":"https://api.github.com/users/thehuijb","html_url":"https://github.com/thehuijb","followers_url":"https://api.github.com/users/thehuijb/followers","following_url":"https://api.github.com/users/thehuijb/following{/other_user}","gists_url":"https://api.github.com/users/thehuijb/gists{/gist_id}","starred_url":"https://api.github.com/users/thehuijb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehuijb/subscriptions","organizations_url":"https://api.github.com/users/thehuijb/orgs","repos_url":"https://api.github.com/users/thehuijb/repos","events_url":"https://api.github.com/users/thehuijb/events{/privacy}","received_events_url":"https://api.github.com/users/thehuijb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thehuijb/cordova-plugin-camera","description":"Mirror of Apache Cordova Plugin camera","fork":true,"url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera","forks_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/forks","keys_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/teams","hooks_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/hooks","issue_events_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/issues/events{/number}","events_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/events","assignees_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/assignees{/user}","branches_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/branches{/branch}","tags_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/tags","blobs_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/git/refs{/sha}","trees_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/statuses/{sha}","languages_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/languages","stargazers_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/stargazers","contributors_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/contributors","subscribers_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/subscribers","subscription_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/subscription","commits_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/commits{/sha}","git_commits_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/git/commits{/sha}","comments_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/comments{/number}","issue_comment_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/issues/comments{/number}","contents_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/contents/{+path}","compare_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/merges","archive_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/downloads","issues_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/issues{/number}","pulls_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/pulls{/number}","milestones_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/milestones{/number}","notifications_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/labels{/name}","releases_url":"https://api.github.com/repos/thehuijb/cordova-plugin-camera/releases{/id}","created_at":"2015-02-19T06:12:47Z","updated_at":"2015-04-21T21:26:39Z","pushed_at":"2015-06-19T09:41:58Z","git_url":"git://github.com/thehuijb/cordova-plugin-camera.git","ssh_url":"git@github.com:thehuijb/cordova-plugin-camera.git","clone_url":"https://github.com/thehuijb/cordova-plugin-camera.git","svn_url":"https://github.com/thehuijb/cordova-plugin-camera","homepage":null,"size":977,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"b3430e6f80a20d8f271dd14625dc641ee18e855d","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":10860591,"name":"cordova-plugin-camera","full_name":"apache/cordova-plugin-camera","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cordova-plugin-camera","description":"Mirror of Apache Cordova Plugin camera","fork":false,"url":"https://api.github.com/repos/apache/cordova-plugin-camera","forks_url":"https://api.github.com/repos/apache/cordova-plugin-camera/forks","keys_url":"https://api.github.com/repos/apache/cordova-plugin-camera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cordova-plugin-camera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cordova-plugin-camera/teams","hooks_url":"https://api.github.com/repos/apache/cordova-plugin-camera/hooks","issue_events_url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cordova-plugin-camera/events","assignees_url":"https://api.github.com/repos/apache/cordova-plugin-camera/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cordova-plugin-camera/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cordova-plugin-camera/tags","blobs_url":"https://api.github.com/repos/apache/cordova-plugin-camera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cordova-plugin-camera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cordova-plugin-camera/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cordova-plugin-camera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cordova-plugin-camera/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cordova-plugin-camera/languages","stargazers_url":"https://api.github.com/repos/apache/cordova-plugin-camera/stargazers","contributors_url":"https://api.github.com/repos/apache/cordova-plugin-camera/contributors","subscribers_url":"https://api.github.com/repos/apache/cordova-plugin-camera/subscribers","subscription_url":"https://api.github.com/repos/apache/cordova-plugin-camera/subscription","commits_url":"https://api.github.com/repos/apache/cordova-plugin-camera/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cordova-plugin-camera/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cordova-plugin-camera/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/cordova-plugin-camera/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cordova-plugin-camera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cordova-plugin-camera/merges","archive_url":"https://api.github.com/repos/apache/cordova-plugin-camera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cordova-plugin-camera/downloads","issues_url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cordova-plugin-camera/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cordova-plugin-camera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cordova-plugin-camera/labels{/name}","releases_url":"https://api.github.com/repos/apache/cordova-plugin-camera/releases{/id}","created_at":"2013-06-22T07:00:13Z","updated_at":"2015-06-21T20:13:36Z","pushed_at":"2015-06-19T09:35:23Z","git_url":"git://github.com/apache/cordova-plugin-camera.git","ssh_url":"git@github.com:apache/cordova-plugin-camera.git","clone_url":"https://github.com/apache/cordova-plugin-camera.git","svn_url":"https://github.com/apache/cordova-plugin-camera","homepage":null,"size":2365,"stargazers_count":172,"watchers_count":172,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":256,"mirror_url":"git://git.apache.org/cordova-plugin-camera.git","open_issues_count":22,"forks":256,"open_issues":22,"watchers":172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/97"},"html":{"href":"https://github.com/apache/cordova-plugin-camera/pull/97"},"issue":{"href":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/97"},"comments":{"href":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cordova-plugin-camera/statuses/381cc602d61a23f501f39a6acdd54e4e4a64ac91"}}}}