savvasdalkitsis / uhuruphotos-android

🖼️A modern media gallery, with features like backup/sync, semantic search, media map, face recognition, memories and much more built using the latest Android technologies.
https://uhuru.photos
Apache License 2.0
358 stars 26 forks source link

Wrong (?) Sync state(?) icon #162

Closed ippocratis closed 1 year ago

ippocratis commented 1 year ago

A cloud icon appears momentarily on the image thumbnail as long as I scroll.
I assume to indicate its a cloud photo regardless in if the photo is in local storage or not and disapears when scrolling stop. acording to the 0.0.80 feature drop the local photos should appear in the feed together with the cloud photos and the thumbnails will show a sync state (local,remote,synced)(icon?)

savvasdalkitsis commented 1 year ago

There are three icons showing in the list while you scroll (they autohide so they are not always cluttering the UI):

Local only:

Screenshot 2023-02-02 at 12 27 30

Fully synced and remote only :

Screenshot 2023-02-02 at 12 27 51

Are you seeing the wrong icon for photos that you have locally and remote?

ippocratis commented 1 year ago

I see only the third icon

I already made a full sync

Clearing the app's storage /reinstalling it and start it from scratch makes no diference

The app is running and behaves the same on 3 diferent devices

2 running android 12 and one android 13 (if it matters)

savvasdalkitsis commented 1 year ago

Can you see the local folders on the Library tab? I currently don't have the UI asking for Storage permissions on the main Feed tab so you will have to make sure to give the app permissions to read your local photos by going to Library and selecting the Local Photos button. Once the app can see the local photos, they should appear on the Feed.

If you can see local photos on the Library tab but not on the feed then the app may not have been able to automatically determine your default Camera folder (it's surprisingly difficult and not standard on Android). It makes a best effort attempt to find it but if it can't then it won't show in the Feed. There is a feature planned where if this happens, the app will ask you to choose one of the folders it can see as the default camera folder.

ippocratis commented 1 year ago

Yes already had done that before the update but tried again after reinstalling the app

Same only the third icon show's

One observation : The local albums folder disappears from library after granting the permission

savvasdalkitsis commented 1 year ago

The button should be removed from the library once you give permission but it should be replaced with the local folders showing your photos. do you see the local photos in the Library tab?

ippocratis commented 1 year ago

No that is missing

Both on github and early access versions

https://user-images.githubusercontent.com/52239579/216401932-b2de1561-93db-49fd-8df1-7af246f57cab.mp4

savvasdalkitsis commented 1 year ago

It takes a while for the app to start scanning the local folders. Navigate away and come back to that screen after a while? There should also be a notification showing you the scanning progress

savvasdalkitsis commented 1 year ago

Any updates on this @ippocratis ? Have you managed to see the icons correctly now?

ippocratis commented 1 year ago

Unfortunately no On 0.82 there is a "synchronising local media" notification but after that finishes only the "remote" photos are shown and still I cant see the local files icon in the library

Sidenote:this happens only on 2 devices running custom ROMs now.

A Redmi note 9s with A13 and no Gapps and Redmi note 8 pro with A12 and Gapps.

On the third device in the family a poco m4 pro 5g running stock MIUI, local photos are displayed as expected in the feed.

So i'm not sure if this is a bug of uhuruphotos I suspect is how those ROMs handle app permissions

Especially storage/files permissions can be tricky in recent android versions

savvasdalkitsis commented 1 year ago

I bet it's the app not being to select the correct camera folder. Can you send me the names of your camera folders on those two devices as they appear in the Library tab? And maybe their full path which you can see by opening one of the photos in those folders and seeing the details section?

ippocratis commented 1 year ago

/storage/emulated/0/DCIM/

On all 3 devices

savvasdalkitsis commented 1 year ago

Hm is that the full path or is there a subfolder under DCIM that the camera photos are under?

ippocratis commented 1 year ago

the full paths for camera photos is /storage/emulated/0/DCIM/Camera

ippocratis commented 1 year ago

READ_EXTERNAL_STORAGE

"Starting in API level 33, this permission has no effect. If your app accesses other apps' media files, request one or more of these permissions instead: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, READ_MEDIA_AUDIO. L"

And to Access other apps' media files that other apps have created, you must declare the appropriate storage-related permissions, and the files must reside in one of the following media collections:

MediaStore.Images
MediaStore.Video
MediaStore.Audio

Looked at the apps requested permissions

aapt dump xmltree /sdcard/Download/uhuru.apk AndroidManifest.xml

Looks like READ_MEDIA_IMAGES, READ_MEDIA_VIDEO,

Permissions are not requested

May all this be relative?

Sorry if I make no sense . I'm only hard guessing here.

savvasdalkitsis commented 1 year ago

The permission set of the app should work fine as the old android.permission.READ_EXTERNAL_STORAGE works fine still.

I believe the issue is that you have so many photos in your phone, and the app is scanning them in a random order, perhaps leaving the camera ones to be scanned much later.

Have you seen the sync progress notification finishing? It should tell you the total number of media being scanned and how many have been scanned so far.

I also literally just made a change, which will be on the next release, that will prioritize the camera media (when found) to be scanned first so the UX is a bit better

ippocratis commented 1 year ago

Indeed in the notification progress bar it States there are ~2500 files

Strange thing is I have ~250 photos in /storage/emulated/0/DCIM/Camera and another ~300 in /storage/emulated/0/Pictures subfolders

The "refreshing feed" scan finishes just fine

savvasdalkitsis commented 1 year ago

The app scans ALL public local media in all folders that any app creates. things like whatsapp, telegram, photo editors etc all have their own folders that are published. Prioritizing the camera folder will make this process much nicer i think.

ippocratis commented 1 year ago

local photos photos & sync/local/remote icons appear as expected now. V.0.084 Not sure what went wrong