Skip to content

@capacitor/camera 6.0.1 pickImages results has zeros/empty in exif GPS data on Android #2147

@danbritt

Description

@danbritt

Bug Report

Plugin(s)

@capacitor/camera 6.0.1

Capacitor Version

   Capacitor Doctor

Latest Dependencies:

  @capacitor/cli: 6.1.0
  @capacitor/core: 6.1.0
  @capacitor/android: 6.1.0
  @capacitor/ios: 6.1.0

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 6.1.0
  @capacitor/android: 6.1.0
  @capacitor/core: 6.1.0

[success] Android looking great! 👌

Platform(s)

Android. Tested on physical device with Android 12 and 14

Current Behavior

When you select a photo that has a location, the exif data returned has zeros/blanks in all the GPS properties. So it appears the GPS data is actually missing for some reason. Example:

{
  ...
  "GPSAltitude": "0/1",
  "GPSAltitudeRef": "0",
  "GPSDateStamp": "",
  "GPSImgDirection": "0/1",
  "GPSImgDirectionRef": "",
  "GPSLatitude": "0/1,0/1,0/1",
  "GPSLatitudeRef": "",
  "GPSLongitude": "0/1,0/1,0/1",
  "GPSLongitudeRef": "",
  "GPSTimeStamp": "00:00:00",
  "GPSVersionID": "\u0000\u0000\u0000\u0000",
  ...
}

Expected Behavior

I would expect the GPS information to have the proper values.

Code Reproduction

Minimal example app: https://github.com/danbritt/capacitor-photo-picker-example

Other Technical Details

Additional Context

I've also attempted to retrieve the file from the path returned using the Filesystem plugin, and then read the exif using a different npm package. I got the same result with the missing/zero'd out GPS properties.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions