Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

191
Vistas
Xiaomi Redmi 7A camera crash

I am looking for help, with a camera crashing problem on an Xiaomi Redmi 7A mobile device.

Device: Xiaomi Redmi 7A, 2GB RAM 16GB ROM, MIUI 12.5.3
Platform: Android 10
Nodejs: 10.24.1
Application Framework: Cordova 9.0.0
Plugins: cordova-plugin-camera 5.0.3, cordova-plugin-advanced-imagepicker 1.5.4, cordova-plugin-background-mode

Description:

In my cordova application (https://github.com/amanfreda/cordova-camera-debug), I want to utilize the camera. The cordova plugins, that I have tried to use are cordova-plugin-advanced-imagepicker (https://github.com/EinfachHans/cordova-plugin-advanced-imagepicker) and the basic cordova camera plugin cordova-plugin-camera (https://github.com/apache/cordova-plugin-camera). They work fine on most devices, except on Xiaomi Redmi 7A. On this specific device, the application crashes at the moment the camera is opened and the picture is taken (as seen in the logs). Then, when the plugin wants to return the image data to the application, the application restarts and the image data is lost. After some googling, the issue seems to be, that Xiaomi's MIUI OS is pretty agressive with killing background processes.

Solutions I Tried:

  • Set the applications battery settings to "No restrictions", and lock the application, so it should stay running in the background. Somthing like https://dontkillmyapp.com/xiaomi
  • Use cordova-plugin-background-mode (https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background) to force my application, to run in the backround. I also tried running it with disableBatteryOptimizations and disableWebViewOptimizations.

Both obvously didn't work, with either camera plugin. This is as far as I got, before I was out of ideas. The github link to the application includes the sample application (nothing fancy, just a couple of buttons that open the camera with the plugins I listed above), and also some logcat logs in the log folder. The logcat logs contain a verbose output of all the logs, application logs and chromium logs. The chrome://inspect console is not much use in this case, because no errors were logged.

So, if anyone came across similar issues I would be grateful for any sort of info that could be provided.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda