MerginMaps / MerginMaps/mobile
Default phone camera saves different EXIF than in App camera
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 388
- Forks
- 87
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 20
Description
**Description**
Different information is stored with photo taken by default phone care and other information are stored by photos taken by Mergin Maps App. This makes inconsistencies when adding the photos to the feature while using a default value populated from the photo EXIF.
Maybe it's just a in-app camera limitation.
**Environment**
Staging
**Application (+ app version, build, operating system)**
2026.3.0-RC2
Android 16
Pixel 9
**Steps to reproduce**
1. Download [testing project](https://app.dev.merginmaps.com/projects/tester-ws-1/tc04_recording/tree)
2. Record a feature to `PhotoSurvey` layer
3. Take a new photo
4. Add another feature and add photo from gallery.
**Use case**
[Project](https://app.dev.merginmaps.com/projects/tester-ws-1/tc04_recording/tree) is configured to use photo exif to autofill some fields.
When I take a new photo, it fails to read the date information.
(I managed to get the datetime by changing fields default value from `read_exif(...)` function to `exif(@project_home + '/' + "photo", 'Exif.Photo.DateTimeOriginal')` )
Other attributes using `read_exif` are fine, though. When I use a photo from the gallery, the `lat` and `lon` fields are empty.
**Actual results**
`Date` field is not autofilled for new photos.
`Lat` and `Lon` fields are missing for photos from Gallery.
**Expected results**
All fields shoulfd be populated by default from the photo's exif.
**Screenshots**
https://github.com/user-attachments/assets/f6f0954b-4190-453e-ab48-5d535a852e22
First image is the new photo taken in App
The second image is taken by default Camera app and added to the feature from Gallery.
```
herman@dell-5560:~/qgis/mm/testing_mm-plugin/recording$ exiftool -n -S ./JPEG_20260701_140241_1373972169027401596.jpg
ExifToolVersion: 12.76
FileName: JPEG_20260701_140241_1373972169027401596.jpg
Directory: .
FileSize: 3510946
FileModifyDate: 2026:07:01 15:03:40+02:00
FileAccessDate: 2026:07:01 15:04:09+02:00
FileInodeChangeDate: 2026:07:01 15:03:40+02:00
FilePermissions: 100664
FileType: JPEG
FileTypeExtension: JPG
MIMEType: image/jpeg
ExifByteOrder: MM
Model: Pixel 9
Make: Google
ApertureValue: 1.6759742693359
SubjectDistanceRange: 1
SubjectDistance: 0.256
ExifImageWidth: 4032
ISO: 22
ExifImageHeight: 2268
ShutterSpeedValue: 724.077343935025
FocalLength: 6.9
ExposureTime: 0.001379262
OffsetTime: +02:00
Flash: 0
SubSecTime: 520
FNumber: 1.68
LightSource: 0
Orientation: 6
ModifyDate: 2026:07:01 14:02:43
GPSLatitudeRef: N
GPSAltitudeRef: 0
GPSVersionID: 2 2 0 0
GPSLongitudeRef: E
GPSTimeStamp: 12:02:38
GPSDateStamp: 2026:07:01
GPSImgDirection: 49
GPSImgDirectionRef: M
JFIFVersion: 1 2
ResolutionUnit: 0
XResolution: 1
YResolution: 1
ProfileCMMType:
ProfileVersion: 1024
ProfileClass: mntr
ColorSpaceData: RGB
ProfileConnectionSpace: XYZ
ProfileDateTime: 2023:03:09 10:57:00
ProfileFileSignature: acsp
PrimaryPlatform:
CMMFlags: 0
DeviceManufacturer: GOOG
DeviceModel:
DeviceAttributes: 0 0
RenderingIntent: 0
ConnectionSpaceIlluminant: 0.9642 1 0.82491
ProfileCreator: GOOG
ProfileID: 97 71 53 40 213 170 163 17 225 67 223 201 62 250 162 104
ProfileDescription: sRGB IEC61966-2.1
ProfileCopyright: Copyright (c) 2023 Google Inc.
MediaWhitePoint: 0.9642 1 0.82491
MediaBlackPoint: 0 0 0
RedMatrixColumn: 0.43604 0.22249 0.01392
GreenMatrixColumn: 0.38512 0.7169 0.09706
BlueMatrixColumn: 0.14305 0.06061 0.71391
RedTRC: (Binary data 32 bytes, use -b option to extract)
ChromaticAdaptation: 1.04788 0.02292 -0.05019 0.02959 0.99048 -0.01704 -0.00922 0.01508 0.75168
BlueTRC: (Binary data 32 bytes, use -b option to extract)
GreenTRC: (Binary data 32 bytes, use -b option to extract)
ImageWidth: 4032
ImageHeight: 2268
EncodingProcess: 0
BitsPerSample: 8
ColorComponents: 3
YCbCrSubSampling: 2 2
Aperture: 1.68
ImageSize: 4032 2268
Megapixels: 9.144576
ShutterSpeed: 0.001379262
SubSecModifyDate: 2026:07:01 14:02:43.520+02:00
GPSAltitude: 262.4
GPSDateTime: 2026:07:01 12:02:38Z
GPSLatitude: 49.6410166666667
GPSLongitude: 17.2237333333333
FocalLength35efl: 6.9
GPSPosition: 49.6410166666667 17.2237333333333
LightValue: 13.1832347893952
herman@dell-5560:~/qgis/mm/testing_mm-plugin/recording$ exiftool -n -S ./JPEG_20260701_140241_1373972169027401596.jpg | grep Date
FileModifyDate: 2026:07:01 15:03:40+02:00
FileAccessDate: 2026:07:01 15:04:09+02:00
FileInodeChangeDate: 2026:07:01 15:03:40+02:00
ModifyDate: 2026:07:01 14:02:43
GPSDateStamp: 2026:07:01
ProfileDateTime: 2023:03:09 10:57:00
SubSecModifyDate: 2026:07:01 14:02:43.520+02:00
GPSDateTime: 2026:07:01 12:02:38Z
herman@dell-5560:~/qgis/mm/testing_mm-plugin/recording$ exiftool -n -S ./PXL_20260628_131919628.jpg
ExifToolVersion: 12.76
FileName: PXL_20260628_131919628.jpg
Directory: .
FileSize: 1733623
FileModifyDate: 2026:07:01 15:03:40+02:00
FileAccessDate: 2026:07:01 15:04:09+02:00
FileInodeChangeDate: 2026:07:01 15:03:40+02:00
FilePermissions: 100664
FileType: JPEG
FileTypeExtension: JPG
MIMEType: image/jpeg
ExifByteOrder: II
ResolutionUnit: 2
Make: Google
Model: Pixel 9
Software: Google
ModifyDate: 2026:07:01 12:51:53
Orientation: 1
YCbCrPositioning: 1
LensModel: Pixel 9 back camera 6.9mm f/1.68
LensMake: Google
ISO: 293
ExposureProgram: 2
FNumber: 1.68
ExposureTime: 0.00461
SensingMethod: 2
SubSecTimeDigitized: 628
OffsetTimeDigitized: +02:00
SubSecTimeOriginal: 628
OffsetTimeOriginal: +02:00
SubSecTime: 628
OffsetTime: +02:00
SubjectDistanceRange: 1
Sharpness: 0
FocalLength: 6.9
Flash: 16
Saturation: 0
Contrast: 0
MeteringMode: 2
SceneCaptureType: 0
SubjectDistance: 0.283
InteropIndex: R98
InteropVersion: 0100
FocalLengthIn35mmFormat: 24
MaxApertureValue: 1.68179283050743
CreateDate: 2026:06:28 15:19:19
ExposureCompensation: 0
DigitalZoomRatio: 0
ExifImageHeight: 2268
WhiteBalance: 0
DateTimeOriginal: 2026:06:28 15:19:19
BrightnessValue: 2.71
ExifImageWidth: 4032
ExposureMode: 0
ApertureValue: 1.68179283050743
ComponentsConfiguration: 1 2 3 0
ColorSpace: 1
SceneType: 1
CustomRendered: 1
ShutterSpeedValue: 0.0046132525837091
ExifVersion: 0232
FlashpixVersion: 0100
GPSVersionID: 0 0 0 0
GPSImgDirectionRef:
GPSLatitudeRef:
GPSImgDirection: undef
GPSLongitudeRef:
GPSAltitudeRef: 0
GPSTimeStamp: 00:00:00
GPSDateStamp:
XResolution: 72
YResolution: 72
Compression: 6
XMPToolkit: Adobe XMP Core 5.1.0-jc003
HasExtendedXMP: EE97F693D12E38B445FADEFF2D473EA0
GFileMetadata:
Version: 1.0
DirectoryItemMime: image/jpeg
DirectoryItemSemantic: Primary
DirectoryItemLength: 0
DirectoryItemPadding: 0
JFIFVersion: 1 1
ProfileCMMType:
ProfileVersion: 1072
ProfileClass: mntr
ColorSpaceData: RGB
ProfileConnectionSpace: XYZ
ProfileDateTime: 2016:01:01 00:00:00
ProfileFileSignature: acsp
PrimaryPlatform:
CMMFlags: 0
DeviceManufacturer:
DeviceModel:
DeviceAttributes: 0 0
RenderingIntent: 1
ConnectionSpaceIlluminant: 0.9642 1 0.82491
ProfileCreator:
ProfileID: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ProfileDescription: sRGB
RedMatrixColumn: 0.43607 0.22249 0.01392
GreenMatrixColumn: 0.38515 0.71687 0.09708
BlueMatrixColumn: 0.14307 0.06061 0.7141
MediaWhitePoint: 0.9642 1 0.82491
RedTRC: (Binary data 40 bytes, use -b option to extract)
GreenTRC: (Binary data 40 bytes, use -b option to extract)
BlueTRC: (Binary data 40 bytes, use -b option to extract)
ProfileCopyright: Google Inc. 2016
ImageWidth: 4032
ImageHeight: 2268
EncodingProcess: 0
BitsPerSample: 8
ColorComponents: 3
YCbCrSubSampling: 2 2
MPFVersion: 0100
NumberOfImages: 2
MPImageFlags: 0
MPImageFormat: 0
MPImageType: 0
MPImageLength: 3171
MPImageStart: 1730452
DependentImage1EntryNumber: 0
DependentImage2EntryNumber: 0
Aperture: 1.68
ImageSize: 4032 2268
Megapixels: 9.144576
ScaleFactor35efl: 3.47826086956522
ShutterSpeed: 0.00461
SubSecCreateDate: 2026:06:28 15:19:19.628+02:00
SubSecDateTimeOriginal: 2026:06:28 15:19:19.628+02:00
SubSecModifyDate: 2026:07:01 12:51:53.628+02:00
GPSDateTime: 00:00:00Z
GPSLatitude:
GPSLongitude:
MPImage2: (Binary data 3171 bytes, use -b option to extract)
CircleOfConfusion: 0.00863829993079914
DOF: 0.261031579291609 0.309005943773684
FOV: 73.7398575770811
FocalLength35efl: 24
HyperfocalDistance: 3.28065544624636
LightValue: 7.70703933536802
LensID: Pixel 9 back camera 6.9mm f/1.68
herman@dell-5560:~/qgis/mm/testing_mm-plugin/recording$ exiftool -n -S ./PXL_20260628_131919628.jpg | grep Date
FileModifyDate: 2026:07:01 15:03:40+02:00
FileAccessDate: 2026:07:01 15:04:09+02:00
FileInodeChangeDate: 2026:07:01 15:03:40+02:00
ModifyDate: 2026:07:01 12:51:53
CreateDate: 2026:06:28 15:19:19
DateTimeOriginal: 2026:06:28 15:19:19
GPSDateStamp:
ProfileDateTime: 2016:01:01 00:00:00
SubSecCreateDate: 2026:06:28 15:19:19.628+02:00
SubSecDateTimeOriginal: 2026:06:28 15:19:19.628+02:00
SubSecModifyDate: 2026:07:01 12:51:53.628+02:00
GPSDateTime: 00:00:00Z
```
The difference
Unique in first (in App) photo
- ChromaticAdaptation
- GPSAltitude
- GPSPosition
- LightSource
- MediaBlackPoint
Unique keys in the Photo originally taken by Camera app:
- BrightnessValue
- CircleOfConfusion
- ColorSpace
- ComponentsConfiguration
- Compression
- Contrast
- CreateDate
- CustomRendered
- DateTimeOriginal
- DependentImage1EntryNumber
- DependentImage2EntryNumber
- DigitalZoomRatio
- DirectoryItemLength
- DirectoryItemMime
- DirectoryItemPadding
- DirectoryItemSemantic
- DOF
- ExifVersion
- ExposureCompensation
- ExposureMode
- ExposureProgram
- FlashpixVersion
- FocalLengthIn35mmFormat
- FOV
- GFileMetadata
- HasExtendedXMP
- HyperfocalDistance
- InteropIndex
- InteropVersion
- LensID
- LensMake
- LensModel
- MaxApertureValue
- MeteringMode
- MPFVersion
- MPImage2
- MPImageFlags
- MPImageFormat
- MPImageLength
- MPImageStart
- MPImageType
- NumberOfImages
- OffsetTimeDigitized
- OffsetTimeOriginal
- Saturation
- ScaleFactor35efl
- SceneCaptureType
- SceneType
- SensingMethod
- Sharpness
- Software
- SubSecCreateDate
- SubSecDateTimeOriginal
- SubSecTimeDigitized
- SubSecTimeOriginal
- Version
- WhiteBalance
- XMPToolkit
- YCbCrPositioning
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Android in-app camera and gallery-photo flows using the linked testing project, then compare the EXIF fields available to the form defaults. Reproduce the missing Date, Lat, and Lon values on Android 16 and verify that both newly captured and gallery photos populate the expected fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, cpp
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100