Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't select document files on new Android versions #18231

Closed
irfano opened this issue Apr 3, 2023 · 1 comment
Closed

Can't select document files on new Android versions #18231

irfano opened this issue Apr 3, 2023 · 1 comment

Comments

@irfano
Copy link
Member

irfano commented Apr 3, 2023

Expected behavior

We should view document files, such as .pdf, on the Media Browser screen on devices that use API 30.

Screenshot from API29 - Notice "pdf" file

Actual behavior

We cannot view document files, such as .pdf, on the Media Browser screen on devices that use API 30.

Screenshot from API30 - No "pdf" file

Steps to reproduce the behavior

  1. Ensure you have at least one pdf file on your device.
  2. Launch WP or JP apps on a device with API 30 or higher.
  3. Navigate to "My Site → Media".
  4. Tap the + button at the top of the screen.
  5. Tap "Choose from device".
  6. Notice your of file is not on the screen
Tested on Emulator Pixel 2 API 30, Android 11, JPAndroid 22.1
@irfano
Copy link
Member Author

irfano commented Jun 21, 2023

To resolve this issue, we need to request a new permission. However, this is high-level permission and primarily intended for file manager apps.

MANAGE_EXTERNAL_STORAGE
...Intended to be used by few apps that need to manage files on behalf of the users.

We do not actually require this permission as we can tap the button on the top and access files through the system's file picker using an intent. In our app, though, we will not be able to display file thumbnails on newer APIs due to Google's privacy concerns.

I am sharing a video to demonstrate how we can upload a pdf file from the device and I'm closing this issue.

device-2023-06-21-234816.webm

@irfano irfano closed this as completed Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants