Esempio n. 1
0
 /// <summary>
 /// 打开相册 选择多个视频
 /// </summary>
 public static void OpenVideo(Action <string[]> callBack)
 {
     NativeGallery.Permission permission = NativeGallery.GetVideosFromGallery((string[] path) =>
     {
         if (path == null || path.Length == 0)
         {
             return;
         }
         if (callBack != null)
         {
             callBack(path);
         }
     });
     if (permission != NativeGallery.Permission.Granted)
     {
         ShowToast("当前没有相册访问权限,请在设置中打开");
         //打开应用程序设置
         if (NativeGallery.CanOpenSettings())
         {
             NativeGallery.OpenSettings();
         }
     }
 }