xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.52k stars 505 forks source link

[Enhancement] Save to gallery! #1455

Open dimonovdd opened 4 years ago

dimonovdd commented 4 years ago

Summary

Saving to the gallery is a very useful feature for saving media files

API Changes

I have a draft for iOS and Android, but I do not know in which the Essentials API class should implement this

mattleibow commented 4 years ago

Ah... I think maybe we named the media picker wrong... Maybe should have been media gallery or something.

What type name sounds correct? I think the past can be fixed, but we just need to think of a better name, or a new api. But I think a new api might not be good as it separates the haller access into bits.

dimonovdd commented 4 years ago

Maybe should have been media gallery

I think it's a good name

dimonovdd commented 4 years ago

@mattleibow Can I rename the MediaPicker class and everything referenced with it to MediaGallery?

jamesmontemagno commented 4 years ago

There are different things...

Like MediaPicker let's you pick or take photos and videos. It could be from the gallery or may not be.

I prefer almost 2 classes.... like "Camera" and "MediaPicker" and picker can TakePhotoAsync or TakeVideoAsync and MediaPicker lets you pick a photo/video.

The Camera could have a feature to save it to the gallery on the device. However, my recommendation is don't as it is extremely complicated and metadata and all this stuff. I have done it, it is terrible.

dimonovdd commented 4 years ago

I just need the ability to save images to the gallery. So I wanted to do it. @jamesmontemagno let me know if there's anything I can do to help

jamesmontemagno commented 4 years ago

I mostly feel like we shouldn't introduce it into the core as it is more of a feature that is very pick per device (especially on android) and will cause a lot of issues. I think it is more of a document how to do it somewhere or write a good blog post.

dimonovdd commented 4 years ago

I don't see anything special about this feature. Why should Xamarin developers add an image saving implementation to their projects? We can do it well, and everyone will take advantage of this feature

The more features out of the box, the bigger our community will be

jamesmontemagno commented 4 years ago

I agree, I just know that from my MediaPlugin that the API to save to gallery doesnt' work on all platforms and on Android isn't consistent across devices. Consistency here is important.

dimonovdd commented 4 years ago

I don't think it's easy. But it works on Android in other apps (Telegram, Whatsapp, etc.) But what API class can we add this to?