Closed heitaoflower closed 3 years ago
I had actually implemented async functions just for the sake of reducing the delay but while testing them, I couldn't see a difference so I've concluded that this delay might be related to pausing the Unity activity and not the plugin itself. Thus, I've made those functions private.
You can change the visibility of AndroidRuntimePermissions.RequestPermissionAsync function to see if using it helps with the delay in your case. Here's an example code for it:
AndroidRuntimePermissions.RequestPermissionAsync( "android.permission.WRITE_EXTERNAL_STORAGE", ( permName, permValue ) =>
{
if( permValue == AndroidRuntimePermissions.Permission.Granted )
Debug.Log( "We have permission to access external storage!" );
else
Debug.Log( "Permission state: " + permValue );
} );
You can also try using this plugin to see if it also has the delay: https://github.com/Over17/UnityAndroidPermissions
Of course, I will try it next week if there is any progress to sync to you ,
Thx agin, my friend.
Hi handsome, I just try to utilize the plugin, frankly speaking it is very pratical, However the delay maybe cased by lock or something like that harm the experience, so Can u try to optimize it soon?
or offer some asynways.
Thanks .