You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/01/25 15:41:36 UTC

[GitHub] [cordova-plugin-camera] Houdhey opened a new issue #707: Not working for Android 11

Houdhey opened a new issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707


   # Bug Report
   
   ## Problem
   My app was working well with Camera, until I tested on Android 11 emulator.  Is there something new to do to make it work for Android 11? Like adding something on Manifest...?
   
   ### What is expected to happen?
   Open the camera.
   
   
   ### What does actually happen?
   Nothing. 
   
   
   
   
   
   ### Command or Code
   `  takeImage() {
       const options: CameraOptions = {
         quality: 100,
         destinationType: this.camera.DestinationType.DATA_URL,
         mediaType: this.camera.MediaType.PICTURE,
         encodingType: this.camera.EncodingType.JPEG,
         correctOrientation: true,
         allowEdit: false,
       };
   
       this.camera.getPicture(options).then(
         (imageData) => {
           console.log('image Data ' + JSON.stringify(imageData));`
   
   
   
   ### Environment, Platform, Device
   Android 11, device : emulator Pixel 3A with Android 11
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] Houdhey commented on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
Houdhey commented on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-775398898


   The problem comes from the ```getFileNameFromUri(Uri uri)``` method in the ```CordovaUri.java```. 
   Especially when doing this method: ```String partial_path = fullUri.split("external_files")[1];```, it gives ```java.lang.ArrayIndexOutOfBoundsException: length=1; index=1```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] djdannycastillo commented on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
djdannycastillo commented on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-774944836


   I have a similar error.
   
   This plugin works like a charm when I select images from gallery in android 10 but when I'm trying to select a video, it doesn't work, It appears a "EACCES (Permission denied)" error.
   
   I'm using
   cordova-plugin-camera 4.1.0
   cordova-android 9.0.0
   
   Any solution?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] sebastian-curland commented on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
sebastian-curland commented on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-767785079


   I'm getting access denied on Android 11 devices when I try to select a picture from gallery or when I use the camera.
   I tried some of the workarounds out there, like targeting to API level 29 and adding `requestLegacyExternalStorage="true"` to the AndroidManifest but it didn't work for me.
   
   Does anyone knows how to get this plugin working in Android 11?
   
   BTW - is there any plan to fix the plugin to work with Android 11 `scoped storage`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] Houdhey edited a comment on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
Houdhey edited a comment on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-774950194


   @djdannycastillo  I also have this problem with Android 10 now.  Not the same errror, it's weird.
   It's an error like : 
   ```
   E/chromium: [ERROR:aw_browser_terminator.cc(123)] Renderer process crash detected (code -1).
   E/chromium: ... Render process kill wasn't handed by all associated webviews, killing application
   ```
   The app can open the camera, but when I will exactly click to take a photo, this error appears, and the app restarts.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] Houdhey commented on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
Houdhey commented on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-775876950


   Using https://ionicframework.com/docs/native/media-capture works fine for Android 11. My app opens camera. If you need inspiration for fix this problem, maybe you should have a look at this plugin


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] djdannycastillo commented on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
djdannycastillo commented on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-774966666


   @Houdhey maybe this can help you #434 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] sebastian-curland commented on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
sebastian-curland commented on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-774950170


   @djdannycastillo for me it started to work once I disabled the editing of the image in the plugin options (and with `requestLegacyExternalStorage="true"`).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] Houdhey commented on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
Houdhey commented on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-774950194


   @djdannycastillo  I also have this problem with Android 10 now.  Not the same errror, it's weird.
   It's an error like : 
   ```E/chromium: [ERROR:aw_browser_terminator.cc(123)] Renderer process crash detected (code -1).
   E/chromium: ... Render process kill wasn't handed by all associated webviews, killing application
   ```
   The app can open the camera, but when I will exactly click to take a photo, this error appears, and the app restarts.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] sebastian-curland edited a comment on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
sebastian-curland edited a comment on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-767785079


   I'm getting access denied on Android 11 devices when I try to select a picture from gallery or when I use the camera.
   I tried some of the workarounds out there, like targeting to API level 29 and adding `requestLegacyExternalStorage="true"` to the AndroidManifest but it didn't work for me.
   
   Does anyone know how to get this plugin working in Android 11?
   
   BTW - is there any plan to fix the plugin to work with Android 11 `scoped storage`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] djdannycastillo commented on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
djdannycastillo commented on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-774963182


   > @djdannycastillo for me it started to work once I disabled the editing of the image in the plugin options (and with `requestLegacyExternalStorage="true"`).
   
   The issue is solved with `requestLegacyExternalStorage="true"` thanks @sebastian-curland 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] Houdhey closed issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
Houdhey closed issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] Houdhey commented on issue #707: Not working for Android 11

Posted by GitBox <gi...@apache.org>.
Houdhey commented on issue #707:
URL: https://github.com/apache/cordova-plugin-camera/issues/707#issuecomment-775180308


   > @Houdhey maybe this can help you #434
   
   Thanks, but I've already seen it and it didn't help. Still the same problem. We can't deliver our app to our client because of this. Same problem for many Ionic plugins, Android 11 broke everything. But these plugins should adapt, Android 11 was deployed in September 2020.
   I'm looking for a solution which doesn't use plugin


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org