Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POCO MIUI 13.0.5 ionic camera plugin is crashing while capturing image #815

Open
Anushaanureddy opened this issue Nov 2, 2022 · 3 comments

Comments

@Anushaanureddy
Copy link

Issue Type

  • [ x ] Bug Report
  • [ x ] Feature Request
  • [ x ] Support Question

Description

POCO MIUI 13.0.5 ionic camera plugin is crashing while capturing an image in the application, Do any solutions for this from anyone? Please share the solution here.

Environment, Platform, Device

Ionic:

Ionic CLI : 5.4.16
Ionic Framework : @ionic/angular 5.5.2
@angular-devkit/build-angular : 0.1000.8
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.0.8
@ionic/angular-toolkit : 2.3.3

Cordova:

Cordova CLI : 11.0.0
Cordova Platforms : android 10.0.0, browser 6.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 21
other plugins)

Utility:

cordova-res : not installed
native-run : 1.7.1

System:

Android SDK Tools : 26.1.1
NodeJS : v12.20.0
npm : 6.14.8
OS : Windows 10

Checklist

  • [ x ] I searched for already existing GitHub issues about this
  • [ x ] I updated all Cordova tooling to their most recent version
  • [ x ] I included all the necessary information above
@potocnikj
Copy link

We've recently been experiencing similar crashes on random android devices.
We also use Cordova CLI 11.0.0, cordova-android 10.

We're not yet sure what to do. But it surely looks like some android version isn't compatible with camera plugin, as crashes didn't start with a new version, but randomly with ever bigger frequency.

@breautek
Copy link
Contributor

breautek commented Nov 7, 2022

For what it's worth (Not sure if this information is relevant for this issue), Cordova uses the Android's Intent system. It's a way of delegating responsibilities to another app, which is the recommended approach that Google suggests. It's mainly used so that users don't need to give explicit permissions to dangerous (privacy sensitive) APIs to several apps, like the Camera permissions/APIs. Instead, apps can use the Intent system to effectively open an existing app to handle a specific task, such as a delegated Camera app to capture images on the behalf of another app.

At the basic level this should work with pretty much any Camera app, however more advanced features like cropping, or resizing images can cause issues depending on the camera app in use or how the user chooses which image format they use.

If the camera app allows you, I'd try experimenting with different camera settings (in the camera app itself), for example if it gives you a choice, try using an older/common format like PNG or JPG to see if it solves your issue.

If you're using the allowEdit option in the Cordova API, it is known to be defective as support is not guaranteed by the underlying Camera application, so try disabling it.

@Anushaanureddy
Copy link
Author

Anushaanureddy commented Nov 8, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants