diff --git a/MediaGallery/MediaGallery.csproj b/MediaGallery/MediaGallery.csproj index a4ad9ed..007b66e 100644 --- a/MediaGallery/MediaGallery.csproj +++ b/MediaGallery/MediaGallery.csproj @@ -7,7 +7,7 @@ Xamarin.MediaGallery maui, xamarin, .net6, ios, android, toolkit, xamarin.forms, media, picker, photos, videos, mediapicker This plugin is designed for picking and saving photos and video files from the native gallery of Android and iOS devices - 2.2.0 + 2.2.1 dimonovdd dimonovdd https://github.com/dimonovdd/Xamarin.MediaGallery diff --git a/Permission/Xamarim.MediaGallery.Permission.targets b/Permission/Xamarim.MediaGallery.Permission.targets index a4dab06..10d2556 100644 --- a/Permission/Xamarim.MediaGallery.Permission.targets +++ b/Permission/Xamarim.MediaGallery.Permission.targets @@ -3,7 +3,7 @@ maui, xamarin, .net6, ios, android, toolkit, xamarin.forms, media, picker, photos, videos, mediapicker This plugin is designed for picking and saving photos and video files from the native gallery of Android and iOS devices - 2.2.0 + 2.2.1 dimonovdd dimonovdd https://github.com/dimonovdd/Xamarin.MediaGallery diff --git a/Permission/src/Permission/SaveMediaPermission.android.cs b/Permission/src/Permission/SaveMediaPermission.android.cs index c96e1a6..3bf7ee6 100644 --- a/Permission/src/Permission/SaveMediaPermission.android.cs +++ b/Permission/src/Permission/SaveMediaPermission.android.cs @@ -1,11 +1,15 @@ -using Android; +using System; +using Android; +using Android.OS; namespace NativeMedia { public partial class SaveMediaPermission { /// List of required declarations. - public override (string androidPermission, bool isRuntime)[] RequiredPermissions => - new (string, bool)[] { (Manifest.Permission.WriteExternalStorage, true) }; + public override (string androidPermission, bool isRuntime)[] RequiredPermissions + => (int)Build.VERSION.SdkInt >= 29 + ? Array.Empty<(string, bool)>() + : new (string, bool)[] { (Manifest.Permission.WriteExternalStorage, true) }; } } \ No newline at end of file diff --git a/Permission/src/Permission/SaveMediaPermission.shared.cs b/Permission/src/Permission/SaveMediaPermission.shared.cs index e026dfd..a7fccd0 100644 --- a/Permission/src/Permission/SaveMediaPermission.shared.cs +++ b/Permission/src/Permission/SaveMediaPermission.shared.cs @@ -2,7 +2,7 @@ namespace NativeMedia { - /// Permission "NSPhotoLibraryAddUsageDescription" for iOS and "WRITE_EXTERNAL_STORAGE" for Android + /// Permission "NSPhotoLibraryAddUsageDescription" for iOS and "WRITE_EXTERNAL_STORAGE" for Android < 10 public sealed partial class SaveMediaPermission : EssentialsEx.Permissions.BasePlatformPermission { } diff --git a/Sample/Common/Maui/Sample.Common.Maui.csproj b/Sample/Common/Maui/Sample.Common.Maui.csproj index 5dd183e..0122b6d 100644 --- a/Sample/Common/Maui/Sample.Common.Maui.csproj +++ b/Sample/Common/Maui/Sample.Common.Maui.csproj @@ -1,4 +1,4 @@ - + net6.0-android33.0;net6.0-ios; diff --git a/Sample/Common/Xamarin/Sample.Common.csproj b/Sample/Common/Xamarin/Sample.Common.csproj index a4f6fc8..1f0e850 100644 --- a/Sample/Common/Xamarin/Sample.Common.csproj +++ b/Sample/Common/Xamarin/Sample.Common.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/Sample/Common/src/FodyWeavers.xml b/Sample/Common/src/FodyWeavers.xml deleted file mode 100644 index 4e68ed1..0000000 --- a/Sample/Common/src/FodyWeavers.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Sample/Common/src/FodyWeavers.xsd b/Sample/Common/src/FodyWeavers.xsd deleted file mode 100644 index 69dbe48..0000000 --- a/Sample/Common/src/FodyWeavers.xsd +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - Used to control if the On_PropertyName_Changed feature is enabled. - - - - - Used to control if the Dependent properties feature is enabled. - - - - - Used to control if the IsChanged property feature is enabled. - - - - - Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form. - - - - - Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project. - - - - - Used to control if equality checks should use the Equals method resolved from the base class. - - - - - Used to control if equality checks should use the static Equals method resolved from the base class. - - - - - Used to turn off build warnings from this weaver. - - - - - Used to turn off build warnings about mismatched On_PropertyName_Changed methods. - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/Xamarim.MediaGallery.targets b/Xamarim.MediaGallery.targets index 1d9f039..f1c4ec6 100644 --- a/Xamarim.MediaGallery.targets +++ b/Xamarim.MediaGallery.targets @@ -3,8 +3,8 @@ <_UseNuget>true <_UseNuget Condition="'$(Configuration)'=='Release'">true - <_LibVersion>2.2.0 - <_PermissionLibVersion>2.2.0 + <_LibVersion>2.2.1 + <_PermissionLibVersion>2.2.1 <_IsSample Condition="'$(_IsSample)'!='false'">true <_NET6 Condition=" $(TargetFramework.StartsWith('net6')) ">true <_IsMobele Condition=" $(TargetFramework.Contains('droid')) OR $(TargetFramework.ToLowerInvariant().Contains('ios')) ">true