Screenshots not shown in android apps (part 2: "Näyttökuva")

REPRODUCIBILITY: 100%
OS VERSION: 4.5.0.24
HARDWARE: X10 III
UI LANGUAGE: Finnish
REGRESSION: It could be it never worked; I’ve had this device for an year now

DESCRIPTION:

Take screenshot (gets named as Näyttökuva…png), then trying to include in WhatsApp but image not to be seen.

NOTE: Removing the ‘unicode’ chars from filename then it works.

PRECONDITIONS:

STEPS TO REPRODUCE:

  1. Take screenshot (e.g. press vol-down vol-up)
  2. Run WhatsApp
  3. Try to share the image, clip->Gallery…

EXPECTED RESULT:

The image just taken seen in the top of “thumbnail” images

ACTUAL RESULT:

The Image just taken not listed (“thumbnail” not seen)

MODIFICATIONS:

patchmanager, but 0 patches in active ;/…

ADDITIONAL INFORMATION:

renaming the image using fingerterm to something not having that ‘ä’ nor that ‘ö’ then
it works (have tried foo.png and Nayttokuva.png – both works)

1 Like

I just tried this and I can find/attach both “Näyttökuva” and “Nayttokuva” screenshots (png) in WhatsApp and FluffyChat.

If you rename the screenshots back to “Näyttökuva” are they again hidden?

Have you tried re-indexing media in Settings? (You need Sailfish Utilities from Store installed.)

I have a bunch of screenshots, some are named “Näyttökuva” and otherd “Screenshot”, that sometimes throws me off.

I just took:
[defaultuser@Xperia10III Screenshots]$ echo Näyttökuva_20231017_001.png | hexdump -C
00000000 4e c3 a4 79 74 74 c3 b6 6b 75 76 61 5f 32 30 32 |N..ytt..kuva_202|
00000010 33 31 30 31 37 5f 30 30 31 2e 70 6e 67 0a |31017_001.png.|

Not visible, then “emptied” media database (I think I have Sailfish utilies installed, but haven’t found that “re-indexing” yet

Not visible, but no change.

then I renamed that to

[defaultuser@Xperia10III Screenshots]$ echo Näyttökuva.png | hexdump -C
00000000 4e c3 a4 79 74 74 c3 b6 6b 75 76 61 2e 70 6e 67 |N..ytt..kuva.png|

Now I have “broken image” icon first in the gallery when that ‘clip’ chosen in WhatsApp

I’ll continue experimenting…

EDIT: bacticked terminal output…

renamed Näyttökuva.png to PIX.png and then it immediately worked fine.

– 30 minites later –

  • took screenshot, started gallery app, viewed it there, closed gallery app
  • opened whatsapp, chose recipient, clip->gallery, chose that ‘broken’ icon mentioned in previous message – it opened that newly taken screenshot :open_mouth:
  • closed whatsapp, opened gallery app, removed that screenshot, closed gallery app
  • opened whatsapp, chose recipient, clip->gallery. broken icon changed to thumbnail of that - removed screenshot. screen flashed and nothing opened when tried to choose that icon. closed whatsapp
  • took another screenshot, opened that in gallery app, closed gallery app
  • opened whatsapp, chose recipient, clip->gallery, chose that thumbnail of that removed screenshot, it opened that “removed” screenshot :open_mouth:

All I can say I find it hard to select a screenshot to a (whatsapp) message. renaming file to not having ä:s or ö:s has worked, but is a bit tiresome (luckily I don’t do that too often…)

The screenshot numbering is also “broken”. If you take three screenshots - 001, 002 and 003 - and then remove the 002 file and take another screenshot, it will become 002 since it’s the first free “slot”.

I made a bug report of that, but it’s not going to be fixed, unfortunately - as won’t localized screenshot names. Double sigh…

2 Likes

There’s a patch for localized screenshot names. I’ve used it for some time and it works just fine.

I don’t know why that would not work. I am less(1)ing that file and the line numbers match.

I’ll devel-su and experiment. thanks.

– 10 minutes later –

  • edited manually
  • vol button (still took) näyttökuva…
  • reboot
  • vol buttons did not work
  • edited file – removed one extra ‘)’ left there
  • vol buttons did not yet work
  • reboot
  • with vol buttons got Screenshot_20231017_001.png \O/

Good enough – if I cared I’d modify yyyymmdd-hhmmss there :smiley:

Your next OS upgrade will reset that file so you will have to edit again.
Here’s the full patchmanager patch to ease the pain.
I assume that you know where to put them.

File: patch.json

{"description": "Name screenshots in English instead of localized system  language ", "name": "no-localized-screenshot", "display_name": "English filenames on screenshots", "category": "silica", "author": "", "discussion": "", "donations": "", "sources": "https://forum.sailfishos.org/t/screenshot-filenames-are-localized/8917/13", "version": "0.0.1", "compatible": ["4.4.0.72","4.4.0.68","4.5.0.16","4.5.0.19","4.5.0.24"]}

File: unified_diff.patch

diff -Naur /usr/share/lipstick-jolla-home-qt5/volumecontrol/Screenshot.qml work/b/usr/share/lipstick-jolla-home-qt5/volumecontrol/Screenshot.qml
--- /usr/share/lipstick-jolla-home-qt5/volumecontrol/Screenshot.qml     2021-11-05 19:58:51.661137361 +0100
+++ /usr/share/lipstick-jolla-home-qt5/volumecontrol/Screenshot.qml     2021-11-05 20:14:40.496900431 +0100
@@ -40,7 +40,7 @@

         //: Filename of a captured screenshot, e.g. "Screenshot_1"
         //% "Screenshot_%1"
-        var filename = fileUtils.uniqueFileName(folderPath, qsTrId("lipstick-jolla-home-la-screenshot") + ".png")
+        var filename = fileUtils.uniqueFileName(folderPath, "Screenshot_%1" + ".png")
         var filePath = folderPath + filename

         shareAction.resources = [ filePath ]

2 Likes