Home > Software engineering >  GPS metadata null on Cordova-plugin-camera-with-exif
GPS metadata null on Cordova-plugin-camera-with-exif

Time:11-07

Using version 1.5.1 of Cordova-plugin-camera-with-exif and quasar 3 typescript based , when extracting exif data from image captured with cordova, , i'm able to get some of the metadata, but not the gps.

{ "aperture": "2.0", "datetime": "2022:10:27 01:41:55", "exposureTime": "0.120003", "flash": "0", "focalLength": "3500/1000", "gpsAltitude": null, "gpsAltitudeRef": null, "gpsDateStamp": null, "gpsLatitude": null, "gpsLatitudeRef": null, "gpsLongitude": null, "gpsLongitudeRef": null, "gpsProcessingMethod": null, "gpsTimestamp": null, "iso": "807", "make": "motorola", "model": "moto g pro", "orientation": "0", "whiteBalance": "0" }

Cordova & Cordova android > 10.1.1

PS: Gps is enabled on my device.

Here is my configuration :

  quality: 30,
  
  destinationType: Camera.DestinationType.FILE_URI,
  
  encodingType: Camera.EncodingType.JPEG,
  
  sourceType: Camera.PictureSourceType.CAMERA ,
  
  mediaType: Camera.MediaType.PICTURE,
  
  cameraDirection: Camera.Direction.BACK,
  
  correctOrientation: true

I'm I missing something ?

CodePudding user response:

In android, we need to activate save location feature in the camera settings itself. To resume, there is 2 permissions.

  • one for the app itself (geolocation permission)
  • one from camera settings => save location

more infos : https://support.google.com/photos/answer/9921876#zippy=,htc-devices,motorola-devices,ios-devices

  • Related