Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

[Enhancement] Save To Gallery#1628

Closed
dimonovdd wants to merge 34 commits intoxamarin:mainfrom
dimonovdd:featureSaveToGalery
Closed

[Enhancement] Save To Gallery#1628
dimonovdd wants to merge 34 commits intoxamarin:mainfrom
dimonovdd:featureSaveToGalery

Conversation

@dimonovdd
Copy link
Copy Markdown
Contributor

@dimonovdd dimonovdd commented Jan 9, 2021

Description of Change

implementation to saving media files with metadata on iOS, MacOS, Android and UWP.

Related to issue

API Changes

public static class MediaGallery
{
    public static Task SaveAsync(MediaFileType type, string filePath);
    public static Task SaveAsync(MediaFileType type, byte[] data, string fileName);
    public static Task SaveAsync(MediaFileType type, Stream fileStream, string fileName);
}
public enum MediaFileType
{
     Image,
     Video
}

PR Checklist

  • Has tests
  • Has samples
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Updated documentation

@mattleibow mattleibow marked this pull request as draft January 15, 2021 23:54
@dimonovdd
Copy link
Copy Markdown
Contributor Author

Hi @mattleibow. I finished a draft implementation of saving video and image files with metadata on ios.
But as you remember, I don't have a real iphone. Could you check it on real devices please?

…ilePath and stream on iOS

- implementation for saving images and video files from stream  on iOS
@dimonovdd
Copy link
Copy Markdown
Contributor Author

@jamesmontemagno
You wrote about the complexity of the implementation in the comments on this issue. Could you check this pull request, please?
This is still a draft, but I tested it as best I could

…ilePath and stream on iOS

- implementation for saving images and video files from stream  on iOS
…sentials into featureSaveToGalery

* 'featureSaveToGalery' of https://github.com/dimonovdd/Essentials:
  - implementation for saving images and video files from byte array, filePath and stream  on iOS - implementation for saving images and video files from stream  on iOS
  - implementation for saving images and video files from filePath  on ios - sample improvement
  implementation for saving images and video files  with metada on ios
  implementation for creating photos albums on ios
  added SaveToGaleryTestPhoto.jpg
  fixed typos
  init SaveToGalery
@follesoe
Copy link
Copy Markdown

follesoe commented Feb 8, 2021

Great to see work on Essentials API to store media in the gallery! We have this exact need in our app, and as some of the APIs are obsolete in Android 11 I am about to start working on that area of the app again. I will try to copy in the work-in-progress version of this API and test it in practice in our app, and report back any findings. For now, the first thing that needs to be addressed is the new permission level for Photos in iOS 14 (on the iOS side).

* main:
  Fix crash when using WebAuthenticator.AuthenticateAsync xamarin#1586 (xamarin#1687)
- empty Tizen File
- fix typos on droid
@dimonovdd
Copy link
Copy Markdown
Contributor Author

Hi @sung-su
I made a draft implementation for several platforms. Is it possible to do this for Tizen?

@dimonovdd dimonovdd marked this pull request as ready for review February 28, 2021 19:35
@dimonovdd dimonovdd changed the title [Draft][Enhancement] Save To Gallery [Enhancement] Save To Gallery Feb 28, 2021
@jamesmontemagno jamesmontemagno added the awaiting-review This PR needs to have a set of eyes on it label Apr 12, 2021
@jamesmontemagno
Copy link
Copy Markdown
Collaborator

Are all of these APIs available on iOS 10+ and Android 5+?

@dimonovdd
Copy link
Copy Markdown
Contributor Author

dimonovdd commented Apr 12, 2021

Are all of these APIs available on iOS 10+ and Android 5+?

Yes. I tested this on android 5.0. Apple documentation says this should work on iOS 8.0. But I only tested this on version 12, 13, and 14.
There are tests for this feature.

Let me know if the naming of classes and methods is correct. I want to create documentation

@opbld33
Copy link
Copy Markdown

opbld33 commented Apr 22, 2021

Docs Build status updates of commit b5d5a6e:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error-InsufficientPermissionOnRepo] User mimisasouvanh does not have sufficient permission on https://github.com/xamarin/Essentials repository. Hint: required permission 'Read', actual permission 'None'.

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@jfversluis
Copy link
Copy Markdown
Member

We won't be doing this for Xamarin.Essentials anymore. Thanks for the time and effort here!

@jfversluis jfversluis closed this Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

awaiting-review This PR needs to have a set of eyes on it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants