MerginMaps / MerginMaps/mobile

Attaching a screenshot results in error with Samsung phones

Open
#4,157 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug photo-refactoring
Dominant language
C++
Stars
388
Forks
87
Avg merge
2d 7h
Merged PRs (30d)
20

Description

Sometimes when using a Samsung phone, the app returns an error when attaching a screenshot as a photo. This appears to be a specific issue with the way Samsung's flavor of Android handles the naming of screenshots by adding the name of the app in the screenshot as a prefix to the photo. If the name of the app contains any spaces, the photo will fail to save to the app.

To reproduce the issue:

  1. Add a Survey point.
  2. Choose to add a photo from gallery.
  3. Switch to another app to make a screenshot.
  4. Make the screenshot.
  5. Switch back to Mergin Maps app.
  6. Select the screenshot which you just made.
  7. Try to save.

Adding a screenshot of 'Chrome' browser (works):
chrome screenshot

Adding a screenshot of 'Play Store' (fails):
play store screenshot

In the diagnostic log, I see this when the photo attachment fails:

2025-10-15T16:28:32.033Z AppState: "Application changed state to:" Qt::ApplicationInactive
2025-10-15T16:28:32.895Z AppState: "Application changed state to:" Qt::ApplicationSuspended
2025-10-15T16:28:35.230Z Select image: Failed to copy image file to /storage/emulated/0/Android/data/uk.co.lutraconsulting/files/projects/1_photos/Screenshot_20251015_172650_Google%20Play%20Store.jpg
2025-10-15T16:28:35.280Z AppState: "Application changed state to:" Qt::ApplicationActive
2025-10-15T16:28:35.285Z Image Loading: Could not load the image. It may be missing or invalid, the URL might be incorrect, or there may be no network connection: /storage/emulated/0/Android/data/uk.co.lutraconsulting/files/projects/1_photos//Screenshot_20251015_172650_Google%20Play%20Store.jpg

Device:
Samsung A53
Android (15.0)
Mergin Maps v2025.5.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by tracing the Android photo-attachment flow using the reproduction steps and diagnostic log, then compare screenshots whose app names contain spaces with those that do not. Done means a Samsung screenshot such as “Google Play Store” saves and loads successfully as a photo.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.