breautek commented on issue #710: URL: https://github.com/apache/cordova-plugin-camera/issues/710#issuecomment-781312580
> We've quantity tested this plugin on several Android devices and the crash only happens on Android 11. The stack trace provided was on a Google Pixel 4XL running Android 11 that crashes consistently around 200 photos captured, but the app does not crash on the same device running on Android 10 with over 1,000 photos Some background knowledge... This plugin uses something called `Intent`, which is a process of delegating an action to another app. This is why this plugin doesn't need the Camera permissions to use the Camera APIs because it delegates the usage of the camera APIs to another app, which then passes the result back to the invoker (aka your app). To be clear, different android devices may have different camera apps installed and different Android versions may different versions of the camera app. For example, the [GoogleCamera](https://play.google.com/store/apps/details?id=com.google.android.GoogleCamera&hl=en_CA&gl=US) app states: > Requirements - The latest version of Google Camera only works on Pixel phones running Android 11 and above. Some features are not available on all devices. Therefore, you running Android 10 on the same device probably means you're running an older version of the GoogleCamera app which may not exhibit your issue. This would probably be useful knowledge to add in the bug ticket for Google. If you view the Google Camera app info, you probably see two different versions. It would be useful to include a version that does not have an issue, and the version that does. > On the same Samsung S20 FE device running Android 11, it consistently crashes at 55 - 65 photos captured and must completely restart the device for it to function at all again. I can't really explain this, other than perhaps the issue is not so much with the Camera apps but a bug in the OS, but if that were the case, I would expect to see the crashing on any device. If the issue produces consistently, one thing that could be done to isolate the issue (and potentially point blame to the cordova plugin) is to create two [minimal reproduction](https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md) apps. These app should be deployed on the devices exhibiting the issue. The first app should be a pure native app, that uses the [Camera Intents](https://developer.android.com/training/camera/photobasics#java). Special note here, the android plugin does not use any AndroidX libraries, so I'd recommend ignoring the Note about using the `cameraX` class or the `camera2` class. You can pull code snippets from [CameraLauncher](https://github.com/apache/cordova-plugin-camera/blob/master/src/android/CameraLauncher.java) class if that helps. The second app should be a minimal cordova app that produces the issue. If the native app fails to demonstrate the issue but the minimal cordova app does, I think that's a good enough evidence that say the my original assessment is wrong, and the GoogleCamera crash may just be a side effect of another issue that is occurring (such as a memory leak inside the cordova plugin?). If that's the case, I'll gladly reopen this issue. It would be useful to share those minimal reproduction apps as well. If you need any assistance in creating these minimal reproduction apps, our [Slack](http://slack.cordova.io/) can probably help you. ---------------------------------------------------------------- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
