{"action":"created","issue":{"url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/160","repository_url":"https://api.github.com/repos/apache/cordova-plugin-camera","labels_url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/160/comments","events_url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/160/events","html_url":"https://github.com/apache/cordova-plugin-camera/pull/160","id":130503049,"number":160,"title":"CB-10270 android: Added back support for file:// URIs to getRealPath","user":{"login":"riknoll","id":13754588,"avatar_url":"https://avatars.githubusercontent.com/u/13754588?v=3","gravatar_id":"","url":"https://api.github.com/users/riknoll","html_url":"https://github.com/riknoll","followers_url":"https://api.github.com/users/riknoll/followers","following_url":"https://api.github.com/users/riknoll/following{/other_user}","gists_url":"https://api.github.com/users/riknoll/gists{/gist_id}","starred_url":"https://api.github.com/users/riknoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riknoll/subscriptions","organizations_url":"https://api.github.com/users/riknoll/orgs","repos_url":"https://api.github.com/users/riknoll/repos","events_url":"https://api.github.com/users/riknoll/events{/privacy}","received_events_url":"https://api.github.com/users/riknoll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-02-01T22:21:41Z","updated_at":"2016-02-12T22:57:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/cordova-plugin-camera/pulls/160","html_url":"https://github.com/apache/cordova-plugin-camera/pull/160","diff_url":"https://github.com/apache/cordova-plugin-camera/pull/160.diff","patch_url":"https://github.com/apache/cordova-plugin-camera/pull/160.patch"},"body":"Our `getRealPath()` function is unable to handle `file: //` URIs, which can occasionally lead it to return an empty string for the result URI. These camera options reproduce when you select an image from the Gallery app:\r\n```\r\n{\r\n    destinationType: Camera.DestinationType.FILE_URI,\r\n    sourceType: Camera.PictureSourceType.PHOTOLIBRARY,\r\n    allowEdit: true,\r\n    correctOrientation: true\r\n}\r\n```\r\nI believe that we used to do something similar to this, but it was removed at some point in the past. @infil00p do you have any idea why that was?"},"comment":{"url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/comments/183518294","html_url":"https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-183518294","issue_url":"https://api.github.com/repos/apache/cordova-plugin-camera/issues/160","id":183518294,"user":{"login":"TanaseButcaru","id":5818117,"avatar_url":"https://avatars.githubusercontent.com/u/5818117?v=3","gravatar_id":"","url":"https://api.github.com/users/TanaseButcaru","html_url":"https://github.com/TanaseButcaru","followers_url":"https://api.github.com/users/TanaseButcaru/followers","following_url":"https://api.github.com/users/TanaseButcaru/following{/other_user}","gists_url":"https://api.github.com/users/TanaseButcaru/gists{/gist_id}","starred_url":"https://api.github.com/users/TanaseButcaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TanaseButcaru/subscriptions","organizations_url":"https://api.github.com/users/TanaseButcaru/orgs","repos_url":"https://api.github.com/users/TanaseButcaru/repos","events_url":"https://api.github.com/users/TanaseButcaru/events{/privacy}","received_events_url":"https://api.github.com/users/TanaseButcaru/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T22:57:58Z","updated_at":"2016-02-12T22:57:58Z","body":"I can confirm this is working for picture selection.\r\n@shahin8r you could use this commit to [prevent empty video content uri](https://github.com/TanaseButcaru/cordova-plugin-camera/commit/e032811c1cf2b382f8576d92cb04e41e0193e221) in case ``getRealPath`` fails to resolve it. You can test my ``unofficial`` branch.\r\n\r\nThe combination between this, my commit for video empty uri & the [cordova-plugin-filepath](https://github.com/hiddentao/cordova-plugin-filepath) plugin is the best workaround at the moment to get ``file://`` uri for selected media file."}}