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

[FEATURE REQUEST] Register as cloud media provider #4436

Open
mjforan opened this issue Jul 14, 2024 · 6 comments
Open

[FEATURE REQUEST] Register as cloud media provider #4436

mjforan opened this issue Jul 14, 2024 · 6 comments

Comments

@mjforan
Copy link

mjforan commented Jul 14, 2024

(Related to the new scoped storage model on Android)

Apps which have a photo picker use something called a cloud media provider. I would like to be able to select photos from OwnCloud but it does not appear - only Google Photos and "None" are possible sources.

Currently I have to use another file explorer app to "save as" my OwnCloud files into the Downloads folder. That way they are exposed to the photo picker.

@JuancaG05
Copy link
Collaborator

Hi @mjforan! Thanks for opening a new issue! 🍻

AFAIK, that photo picker you're talking about is the DocumentsProvider in Android, and works for every app that has its own implementation, as it happens with the ownCloud Android app. For example, if you go to Gmail, compose a new email and try to attach files, the DocumentsProvider will be opened and you will be able to select files from your ownCloud account (as long as you have disabled inside the ownCloud app Settings > Security > Lock access from document provider, which is disabled by default). If this is not the case, please describe your use case so that I can reproduce it.

OTOH, copying ownCloud files to the Downloads folder is a different use case, and here we do get in conflict with the scoped storage aim. But if your objective is just being able to pick photos from your ownCloud account, this shouldn't be needed, so as I said before, please describe your use case so that we can provide the best support 😀. Will wait for your response!

@mjforan
Copy link
Author

mjforan commented Jul 15, 2024

I am talking about something different. Yes I can access OwnCloud from gmail-> attach file, but there is a different option called "insert photo" which pulls from the registered cloud media providers. See my screenshots for what this looks like (Pixel 5, Android 14, OwnCloud 4.3.0). Some of my other apps use ONLY this media picker interface, especially if they are looking for pictures, not documents.

0_attachment_options
1_media_picker
2_media_picker_menu
3_no_owncloud

@mjforan
Copy link
Author

mjforan commented Jul 15, 2024

Actually this API is currently restricted:

Only apps nominated by OEMs are eligible to participate in this program to become a cloud media provider for Android at this time.

https://developer.android.com/guide/topics/providers/cloud-media-provider

I guess I will have to encourage my other apps to implement the document provider browser.

@JuancaG05
Copy link
Collaborator

JuancaG05 commented Jul 15, 2024

Hi @mjforan! Yeah, I see... I didn't know about cloud media providers, but I see it is kind of restrictive to access the program and being elegible. In any case, thanks for the issue, we can keep it open just in case in a future we're interested on fulfilling all the conditions and introduce it in the app 👍

For the moment you can pick your photos in your ownCloud account via the documents provider, if you're able to access the Downloads folder from any other app you should be able to access your ownCloud files via this provider.

@Doomsdayrs
Copy link

Wouldn't this feature than be available for open source custom roms instead? Or perhaps I misunderstand the documentation.

@JuancaG05
Copy link
Collaborator

Hi @Doomsdayrs! I don't think so, as far as I understand, the cloud media provider registers elegible apps (not ownCloud currently) to choose pictures directly from the cloud of those apps. But nothing to do with custom roms.

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

3 participants