简体   繁体   English

如何以 xamarin 形式将视频保存到图库

[英]how to save videos to the gallery in xamarin forms

How to save video to gallery in xamarin forms.I want to save videos that taked to gallery.i used the following code but its not worked.The videonot in the gallery after uploading the video.如何以 xamarin 形式将视频保存到图库。我想保存拍摄到图库的视频。我使用了以下代码但它不起作用。上传视频后视频不在图库中。

var _file = await CrossMedia.Current.TakeVideoAsync(new Plugin.Media.Abstractions.StoreVideoOptions
        {
            Name = "gtsvideo.mp4",
            SaveToAlbum = true,

        });

This functionality is not implemented for Android in the plugin yet, it works on iOS only .此功能尚未在插件中为 Android 实现,它仅适用于 iOS

If you want to save the file to gallery, you will have to implement the saving yourself manually.如果要将文件保存到图库,则必须手动实现保存。 For tips on how to do that look for a Java implementation of this on Android and replicate it in C#.有关如何执行此操作的提示,请在 Android 上查找此 Java 实现并将其复制到 C# 中。 Look into documentation for some simple samples.查看一些简单示例的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何截取我的 Xamarin.Forms 应用程序的部分屏幕截图并将其保存到我的库中? - How can I take a partial screenshot of my Xamarin.Forms app and save it into my gallery? 如何从 Xamarin Forms 中的图库中 select 多张图片并保存到所需的文件路径? - How to select multiple images from gallery in Xamarin Forms and save to desired file path? 如何以 xamarin 形式从图库中选择图像? - How to select an image from gallery in xamarin forms? Xamarin 表单如何从图库中选择图像 - Xamarin forms How to pick a Image from Gallery 将图像从图像框保存到 Xamarin Forms 中的图库 - Save image from an image box to gallery in Xamarin Forms Xamarin.Forms,如何打开默认图库应用 - Xamarin.Forms, How to open default gallery app 如何使用 Xamarin 在 Android 上的图库中请求保存图像的授权? - How to ask authorization for save image in Gallery on Android using Xamarin? 如何将照片从画廊保存到Xamarin中Windows服务器上的共享文件夹 - How to save photos from gallery to shared folder on a windows server in xamarin 如何使用 xamarin 将照片保存在 android 的图库文件夹中 - how to save photo in gallery folder in android using xamarin C#Xamarin形成了如何访问设备库并为自定义库网格视图检索所有图像的方法 - C# Xamarin forms how to access device gallery and retrieve all images for a custom gallery grid view
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM