-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat: MediaGallery
#1146
base: main
Are you sure you want to change the base?
feat: MediaGallery
#1146
Conversation
e689a91
to
1f0282a
Compare
2c7ab9d
to
cb63db8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Missing related documentation @MartinZikmund please -> https://github.com/unoplatform/uno.toolkit.ui/tree/main/doc
...lkit.Samples/Uno.Toolkit.Samples.Shared/Content/Helpers/MediaGalleryHelperSamplePage.xaml.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could use some relevant doc on this
...lkit.Samples/Uno.Toolkit.Samples.Shared/Content/Helpers/MediaGalleryHelperSamplePage.xaml.cs
Show resolved
Hide resolved
src/Uno.Toolkit.UI/Helpers/MediaGallery/MediaGallery.Android.cs
Outdated
Show resolved
Hide resolved
src/Uno.Toolkit.UI/Helpers/MediaGallery/MediaGallery.Android.cs
Outdated
Show resolved
Hide resolved
src/Uno.Toolkit.UI/Helpers/MediaGallery/MediaGallery.Android.cs
Outdated
Show resolved
Hide resolved
src/Uno.Toolkit.UI/Helpers/MediaGallery/MediaGallery.Android.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Xiaotian Gu <[email protected]> Co-authored-by: Agnès ZITTE <[email protected]>
@agneszitte docs added |
|
||
## Remarks | ||
|
||
This class is designed to work on iOS, Mac Catalyst and Android platforms, utilizing platform-specific implementations for its methods. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is designed to work on iOS, Mac Catalyst and Android platforms, utilizing platform-specific implementations for its methods. | |
This class is designed to work on iOS, Mac Catalyst, and Android platforms, utilizing platform-specific implementations for its methods. |
|
||
This class is designed to work on iOS, Mac Catalyst and Android platforms, utilizing platform-specific implementations for its methods. | ||
|
||
The API allows setting the `targetFileName`, which **should ideally be unique** - otherwise the OS will either overwrite an existing file with the same name (Android behavior), or generate a new name instead (iOS behavior). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API allows setting the `targetFileName`, which **should ideally be unique** - otherwise the OS will either overwrite an existing file with the same name (Android behavior), or generate a new name instead (iOS behavior). | |
The API allows setting the `targetFileName`, which **should ideally be unique** - otherwise the OS will either overwrite an existing file with the same name (Android behavior) or generate a new name instead (iOS behavior). |
|
||
#### Summary | ||
|
||
Checks the user's permission to access the device's gallery. Will trigger the permission request if not already granted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checks the user's permission to access the device's gallery. Will trigger the permission request if not already granted. | |
Checks the user's permission to access the device's gallery. It will trigger the permission request if it has not already been granted. |
<string>This app needs access to the photo gallery for saving photos and videos</string> | ||
``` | ||
|
||
If you want to support earlier versions iOS, add the following as well: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to support earlier versions iOS, add the following as well: | |
If you want to support earlier versions of iOS, add the following as well: |
#endif | ||
``` | ||
|
||
### Copying an application package file to gallery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Copying an application package file to gallery | |
### Copying an application package file to the gallery |
} | ||
catch (Exception ex) | ||
{ | ||
tcs.TrySetResult(ex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you choose to use TrySetResult instead of TrySetException?
GitHub Issue (If applicable): closes unoplatform/uno#16721, closes #1147
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Internal Issue (If applicable):