Reputation: 31
I'm trying to save a video file using FilePicker Task but its not showing FileSavePicker task in Solution. Below a screen shot is attached
There are only 4 tasks showing in Windows.Storage.Pickers
Here is code I'm using
async void TrimVideoFile()
{
Windows.Storage.StorageFile source;
Windows.Storage.StorageFile destination;
var openPicker = new Windows.Storage.Pickers.FileOpenPicker();
openPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.VideosLibrary;
openPicker.FileTypeFilter.Add(".wmv");
openPicker.FileTypeFilter.Add(".mp4");
source = await openPicker.PickSingleFileAsync();
var savePicker = new Windows.Storage.Pickers.FileSavePicker()
savePicker.SuggestedStartLocation =
Windows.Storage.Pickers.PickerLocationId.VideosLibrary;
savePicker.DefaultFileExtension = ".mp4";
savePicker.SuggestedFileName = "New Video";
savePicker.FileTypeChoices.Add("MPEG4", new string[] { ".mp4" });
destination = await savePicker.PickSaveFileAsync();
// Method to perform the transcoding.
TrimFile(source, destination);
}
Its showing only 4 tasks. What to do to use FileSavePicker task. I'm using Visual Studio 2012 and my targeted app is Windows Phone 8.0 App.
Upvotes: 3
Views: 219
Reputation: 21899
File pickers are not available on Windows Phone 8. They were added with Windows Phone 8.1.
See the Version section in the FileSavePicker docs on MSDN:
Minimum supported phone Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]
Upvotes: 1