primal-android-app icon indicating copy to clipboard operation
primal-android-app copied to clipboard

Use the native Android file picker

Open Zorbiks opened this issue 1 year ago • 3 comments

Summary

Use the native Android file picker instead of the custom one.

Basic Example

When selecting videos or pictures, the native Android file picker should be utilized.

Motivation

The current file picker has several issues:

  • It only displays four folders in the Album tab: Videos, Camera, Screenshots, and Downloads. Other folders containing media files are not accessible.
  • The "Videos" album is not a true folder; it filters all video files instead of referencing a specific directory.
  • It is unclear what the sorting is based on, whether it is the date of last modification or the date in the metadata. For example, when I download a video from X and try to select it, it does not appear as the first item, even though I just downloaded it, and the file picker is supposed to sort by date.

By implementing the native Android file picker, users will gain access to all media on their devices through a familiar interface and folder structure.

Zorbiks avatar Nov 09 '24 16:11 Zorbiks

Hey @Zorbiks,

We are already using native picker: https://github.com/PrimalHQ/primal-android-app/blob/eb9464fd7dc7f047c3ff8048efe52e1eb8237aa5/app/src/main/kotlin/net/primal/android/core/compose/ImportPhotosIconButton.kt

Did you had something else in mind?

AleksandarIlic avatar Nov 27 '24 11:11 AleksandarIlic

Hey @Zorbiks,

We are already using native picker: https://github.com/PrimalHQ/primal-android-app/blob/eb9464fd7dc7f047c3ff8048efe52e1eb8237aa5/app/src/main/kotlin/net/primal/android/core/compose/ImportPhotosIconButton.kt

Did you had something else in mind?

I am not sure whether it is the native picker or not, but I can assure it is not what most if not all Android applications use. I am attaching screenshots of what I believe is the best workflow for the Clipboard or Attach icon in messaging or social media applications, by SimpleX. As you can see, you can select Camera for live picture or video, images for image files available to pick in the gallery application of your choice, Videos and Files.

SimpleX clipboard button: Image

Allows me to choose between stock gallery, or third-party gallery as I have not set a default one yet in my system: Image

I don't remember where I got this particular screenshot, but this is more what I'd consider "native Android picker" than what Primal currently ships with: shows image thumbnails and offers options to switch proper gallery applications, seems like a general purpose file explorer, if you know what I mean. Image

Primal's. You cannot switch to third-party, or stock gallery application, like OP says, you only have access to the 4 mentioned albums on device, no extra albums/folders available in that tab. Under Photos you have the entire storage of image files, not sorted; hard to scan through, especially if picture (or video) you want to attach is old. Image

This is why SimpleX is my favorite picker when I think about it: allows me to pick which file format I am sending and that way exclusively shows me the matching file types, e.g. images only, vs. videos only, vs. files only.

rottenwheel avatar Mar 25 '25 06:03 rottenwheel

No changes with v2.2.13 yet, unfortunately.

rottenwheel avatar Apr 30 '25 20:04 rottenwheel