我想制作一个录像机,为此,我想将录制的视频保存到图库中,但不保存在图库中,而是保存的是自己的内部应用存储空间
private async void VideoRecorderAsync()
{
if (!CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakeVideoSupported)
{
_pageDialog.DisplayAlertAsync("No Camera", ":( No camera avaialble.", "OK");
return;
}
//var pathFile = Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDownloads);
//var absolutePath = pathFile.AbsolutePath;
var file = await CrossMedia.Current.TakeVideoAsync(new Plugin.Media.Abstractions.StoreVideoOptions
{
SaveToAlbum = true,
});
if (file == null)
return;
_pageDialog.DisplayAlertAsync("Video Recorded", "Location: " + file.AlbumPath, "OK");
file.Dispose();
}
我想从移动图库中保存图片。