[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15193106#comment-15193106 ] jcesarmobile commented on CB-10270: --- Ok, closing this one. We can continue with the google drive problem on the issue you created. But as far as I know, it's not possible to get the path from google drive, you can read the file using an inputStream and write the data to a tmp folder and use the path of the copy. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: jcesarmobile >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15192954#comment-15192954 ] Dagfinn Parnas commented on CB-10270: - [~jcesarmobile] can confirm that in general it's working with version 2.1.1. Have however discovered that with Google Drive returns a blank string. Testing on Android 6.0.1 and using the following options navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50, correctOrientation: true, destinationType: destinationType.FILE_URI, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, mediaType: Camera.MediaType.ALLMEDIA, }); [~riknoll] Should this be reported as a separate issue? > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15192336#comment-15192336 ] jcesarmobile commented on CB-10270: --- This should be fixed in 2.1.1 version (just released) can somebody confirm? > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190838#comment-15190838 ] ASF GitHub Bot commented on CB-10270: - Github user jcesarmobile commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-195337221 I'm going to send a PR that will use the API 19 method on android 11 and greater and will handle file urls > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190287#comment-15190287 ] Cameron Gregory commented on CB-10270: -- quick test and that worked for me (nexus 7 android 5.1.1, galaxy core 2 / 4.4.2, 6+ ios 9 <- JIC) thanks! Cameron > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190111#comment-15190111 ] ASF GitHub Bot commented on CB-10270: - Github user riknoll commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-195084460 @jcesarmobile I don't even know if this is an issue in Jelly Bean. Do you have a device to test with? > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190094#comment-15190094 ] ASF GitHub Bot commented on CB-10270: - Github user jcesarmobile commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-195082019 #175 only fixes it on API 19 and greater, maybe it should be moved outside. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190079#comment-15190079 ] ASF GitHub Bot commented on CB-10270: - Github user riknoll closed the pull request at: https://github.com/apache/cordova-plugin-camera/pull/160 > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190078#comment-15190078 ] ASF GitHub Bot commented on CB-10270: - Github user riknoll commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-195077141 Seems to have been fixed by #175, so I'm closing this > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182752#comment-15182752 ] Dagfinn Parnas commented on CB-10270: - [~riknoll] any idea on when the PR can be resolved and when a new version of the camera plugin is published to NPM? Have a large GoLive soon which is dependent on this fix and need to plan our options accordingly (currently using phonegap build, so can only use plugins which are published on npm) > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15159638#comment-15159638 ] Theo Vis commented on CB-10270: --- Thanks > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15159613#comment-15159613 ] Richard B Knoll commented on CB-10270: -- [~theovis] the video type is actually a separate (albeit similar) issue. See CB-10177 > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15159604#comment-15159604 ] Theo Vis commented on CB-10270: --- Confirm Issue, picking a video from internal storage returns empty string. The getRealPath doesn't resolve to a local url and returns '' see getRealPathFromURI_API19 - FileHelper Version: - Camera Version : 2.1.0 - Android version : 5.1.1 0 Sony - Z5 A quick and dirty fix is adding the following line to CameraLauncher.java See : https://github.com/TanaseButcaru/cordova-plugin-camera-unofficial/commit/e032811c1cf2b382f8576d92cb04e41e0193e221 {quote} if (this.mediaType != PICTURE) { +if (fileLocation.isEmpty()) fileLocation = uri.toString(); this.callbackContext.success(fileLocation); } {/qutoe} > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll > Labels: android, mustfix, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15150430#comment-15150430 ] Oleksiy Nesterov commented on CB-10270: --- Hi guys. Confirm. Same issue for me. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15145495#comment-15145495 ] ASF GitHub Bot commented on CB-10270: - Github user TanaseButcaru commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-183518294 I can confirm this is working for picture selection. @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. The 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. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141578#comment-15141578 ] ASF GitHub Bot commented on CB-10270: - Github user shahin8r commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-182563046 This doesn't seem to fix empty string for videos (mediaType: 1) but is working fine on photos. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15139374#comment-15139374 ] ASF GitHub Bot commented on CB-10270: - Github user riknoll commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-181996971 Alright, the real solution to this problem in my opinion is to get rid of the `getRealPath` function altogether. Not all URIs have real paths and there are always going to be some cases that fail. The "Android" way of handling this is to use ContentResolvers in order to get input streams and to stop trying to force everything into being a file on the device. Unfortunately, that is a major rewrite of this plugin. The sheer number of JIRA issues and open PRs that deal with it should be justification enough, though. As for this PR, it does patch over one issue and so I'm inclined to leave it open as is. The other issue you are seeing is related but requires a very different fix. I believe there is already a JIRA open tracking it but I can't recall the issue ID off the top of my head. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15138795#comment-15138795 ] ASF GitHub Bot commented on CB-10270: - Github user olexme commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-181818806 I had the same issue (empty string from getPicture() when trying to get the gallery picture) and I've just tried to use this PR by cordova plugin add https://github.com/MSOpenTech/cordova-plugin-camera#ee06d3efb233d5404d0aeda2abe08e6fd765c7fe Unfortunatelly it didn’t solve the issue - instead the empty string I get “file://“. My options: options = { quality:80, encodingType: 0, destinationType:1, sourceType: 0, allowEdit: false, saveToPhotoAlbum: false, correctOrientation: true, cameraDirection:1 }; Android 5.0.0 on Galaxy S5 > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15138566#comment-15138566 ] ASF GitHub Bot commented on CB-10270: - Github user shaoner commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-181769966 @riknoll yes, actually if you don't set correctOrientation to true, getRealPath is never called, it returns the uri instead (I don't see why) so this is not empty: ```java if (this.targetHeight == -1 && this.targetWidth == -1 && (destType == FILE_URI || destType == NATIVE_URI) && !this.correctOrientation) { this.callbackContext.success(uri.toString()); ``` However, I think we have two issues here: 1. getRealPath should be called even with correctOrientation set to false 2. `FileHelper.getRealPathFromURI_API19` throws an exception, returning an empty path in some cases: - happens with my galaxy S4 device (android v5.0.1) and I guess it cannot be reproduced with a S4 emulator unless the same rom is used - does not happen with a nexus S emulator (android v5.1.1) ( this seems to be the case for LG G3 as well, http://stackoverflow.com/questions/2789276/android-get-real-path-by-uri-getpath/33074944#33074944 ) For now, I've got it working by returning `getRealPathFromURI_BelowAPI11` if the path is empty. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15138446#comment-15138446 ] ASF GitHub Bot commented on CB-10270: - Github user anuj6117 commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-181738797 Yes, I am getting an empty string back from the getPicture() call. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15137418#comment-15137418 ] ASF GitHub Bot commented on CB-10270: - Github user riknoll commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-181510405 @shaoner @anuj6117 Is that exception related to [the JIRA](https://issues.apache.org/jira/browse/CB-10270) this PR is addressing? That is, does it result in you getting an empty string back from the `getPicture()` call? > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15136583#comment-15136583 ] ASF GitHub Bot commented on CB-10270: - Github user anuj6117 commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-181195873 I am also facing the same exception if I use ALLMEDIA. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15135851#comment-15135851 ] ASF GitHub Bot commented on CB-10270: - Github user shaoner commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-180798266 @riknoll, somehow an exception is triggered by this line for some uri: ```java try { String wholeID = DocumentsContract.getDocumentId(uri); // ... } catch(Exception e) { filePath = ""; } ``` The exception looks actually like: > java.lang.IllegalArgumentException: Invalid URI: content://media/external/images/media/5230 > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127162#comment-15127162 ] ASF GitHub Bot commented on CB-10270: - Github user riknoll commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-178228435 For reference, [this](https://github.com/apache/cordova-plugin-camera/commit/929733b8913311f2cfd504937268a8a1d22f4f9a) is the commit I mentioned. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127159#comment-15127159 ] ASF GitHub Bot commented on CB-10270: - GitHub user riknoll opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/160 CB-10270 android: Added back support for file:// URIs to getRealPath 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: ``` { destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, allowEdit: true, correctOrientation: true } ``` I 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? You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-10270 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/160.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #160 commit ee06d3efb233d5404d0aeda2abe08e6fd765c7fe Author: riknoll Date: 2016-01-29T23:47:00Z CB-10270 android: Added back support for file:// URIs to getRealPath > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124356#comment-15124356 ] Richard B Knoll commented on CB-10270: -- The issue (at least on KitKat) is that we are trying to use the content resolver to resolve a {{file: //}} URI and obviously getting nothing back. Should be a simple fix. Looks like it was probably introduced by [this commit|https://github.com/apache/cordova-plugin-camera/commit/929733b8913311f2cfd504937268a8a1d22f4f9a]. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124272#comment-15124272 ] Richard B Knoll commented on CB-10270: -- The minimal reproducing camera options are: {code} { destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, allowEdit: true, correctOrientation: true } {code} > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124180#comment-15124180 ] Richard B Knoll commented on CB-10270: -- Those content URIs that don't display, by the way, are problems with mobilespec and not the camera plugin. mobilespec is getting an error from the file plugin and not displaying the URI as a result. I am able to display the URI and replicate these results in another test app. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124144#comment-15124144 ] Richard B Knoll commented on CB-10270: -- Testing with the provided mobilespec app: Here are the results I get on Kitkat ||{{allowEdit}}||{{correctOrientation}}||result |true|true|Empty String |false|true|All Good |true|false|All Good |false|false|Content URI that doesn't display And on Marshmallow: ||{{allowEdit}}||{{correctOrientation}}||result |true|true|Empty String |false|true|All Good |true|false|Content URI that doesn't display |false|false|Content URI that doesn't display I think this is definitely affected by {{allowEdit}}, which has always been buggy. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Assignee: Richard B Knoll >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15122809#comment-15122809 ] Richard B Knoll commented on CB-10270: -- It's pretty likely this has to do with how we handle URIs and content resolvers. I'm bumping the priority of this because it seems pretty easy to hit and pretty serious. Hopefully I'll be able to tackle this soon. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera >Affects Versions: 2.1.0 > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin >Priority: Critical > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15115462#comment-15115462 ] Phong Kien commented on CB-10270: - Important to note that this is only occurred on latest version 2.1.0. Older version, 1.2.0 is working fine. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101981#comment-15101981 ] Alexander Sorokin commented on CB-10270: Setting `allowEdit` to false doesn't affect the issue for me. Returned string is still empty. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099156#comment-15099156 ] Richard B Knoll commented on CB-10270: -- Are you using {{allowEdit}}? Setting that to false alleviates the issue for me. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099151#comment-15099151 ] Richard B Knoll commented on CB-10270: -- Yep, reproduced on Kit-Kat > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin > Labels: android, reproduced, triaged > Attachments: mobilespec-camera.7z > > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15091853#comment-15091853 ] Alexander Sorokin commented on CB-10270: Just repro'ed it on 4.4.2 device. I'm attaching built mobilespec app. Just go to manual plugin tests, camera tests, then change sourceType to PHOTOLIBRARY and select an image from the gallery. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin > Labels: android, triaged, wfc > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15091849#comment-15091849 ] Alexander Sorokin commented on CB-10270: This also seem to reproduce on api21 emulator (Android 5.0.2) > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin > Labels: android, triaged, wfc > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15091834#comment-15091834 ] Alexander Sorokin commented on CB-10270: [~riknoll] I'm using an API level 19 emulator (Android 4.4.4) with default camera and gallery apps. The version of camera plugin is master. > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin > Labels: android, triaged, wfc > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15081521#comment-15081521 ] Richard B Knoll commented on CB-10270: -- I can't reproduce this. What app are you using to select the photo? What version of the camera plugin are you using? > camera.getPicture() returns an empty string > --- > > Key: CB-10270 > URL: https://issues.apache.org/jira/browse/CB-10270 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera > Environment: Android 4.4.2 (api 19) >Reporter: Alexander Sorokin > > Code sample to reproduce: > {code} > navigator.camera.getPicture(onSuccess, onFail, { > destinationType: Camera.DestinationType.FILE_URI, > sourceType: Camera.PictureSourceType.PHOTOLIBRARY, > correctOrientation: true > }); > {code} > {{onSuccess}} is called with an empty string as an argument. > if {{correctOrientation}} is {{false}}, everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org