Skip to content

Commit

Permalink
Fixed permission not being asked in an edge case on Android (it's str…
Browse files Browse the repository at this point in the history
…ongly recommended to use RequestPermissionAsync)
  • Loading branch information
yasirkula committed Dec 9, 2023
1 parent f70766d commit 705dabf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Plugins/NativeGallery/NativeGallery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public static Permission RequestPermission( PermissionType permissionType, Media
{
NGPermissionCallbackAndroid nativeCallback = new NGPermissionCallbackAndroid( threadLock );

AJC.CallStatic( "RequestPermission", Context, nativeCallback, permissionType == PermissionType.Read, (int) mediaTypes, PlayerPrefs.GetInt( "NativeGalleryPermission", (int) Permission.ShouldAsk ) );
AJC.CallStatic( "RequestPermission", Context, nativeCallback, permissionType == PermissionType.Read, (int) mediaTypes, (int) Permission.ShouldAsk );

if( nativeCallback.Result == -1 )
System.Threading.Monitor.Wait( threadLock );
Expand Down
2 changes: 1 addition & 1 deletion Plugins/NativeGallery/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Native Gallery for Android & iOS (v1.7.7) =
= Native Gallery for Android & iOS (v1.7.8) =

Documentation: https://github.com/yasirkula/UnityNativeGallery
FAQ: https://github.com/yasirkula/UnityNativeGallery#faq
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.yasirkula.nativegallery",
"displayName": "Native Gallery",
"version": "1.7.7",
"version": "1.7.8",
"documentationUrl": "https://github.com/yasirkula/UnityNativeGallery",
"changelogUrl": "https://github.com/yasirkula/UnityNativeGallery/releases",
"licensesUrl": "https://github.com/yasirkula/UnityNativeGallery/blob/master/LICENSE.txt",
Expand Down

0 comments on commit 705dabf

Please sign in to comment.