Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
Taking photos with Cordova on Android

I am trying to take photos on Android with my Cordova app. It is a very simple implementation using the below snippet:

navigator.camera.getPicture((src) => {
    image.src = `url('data:image/jpeg;base64,${src}')`;
}, (err) => {
    throw err;
}, {
    quality: 50,
    destinationType: Camera.DestinationType.DATA_URL,
    sourceType: Camera.PictureSourceType.camera,
    encodingType: Camera.EncodingType.JPEG,
    mediaType: Camera.MediaType.PICTURE,
    allowEdit: false,
    correctOrientation: true,
    targetWidth: 1024,
    targetheight: 1024
});

With image being an object I save in localStorage for use later. It worked perfectly until recently and I can't figure out what I did to break it. I did not change any config XML files or update any node packages, and the code was not changed. The error I get on debugging is this:

Uncaught Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference

In addition, the application crashes when allowing file access permissions.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!