FileSavePicker task not showing in Window.Storage.Pickers in wp8 C #

I'm trying to save a video file using a FilePicker task, but I can't see the FileSavePicker task in the solution. Below is attached screenshot

There are only 4 tasks in Windows. Pickers repository

  • FileExtensionVector
  • FileOpenPicker
  • PickerLocationId
  • PickerViewMode

Here is the code I am 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);
    }

      

Only 4 tasks are shown. What to do to use the FileSavePicker task. I am using Visual Studio 2012 and my target app is Windows Phone 8.0 app.

+3


source to share


1 answer


File collectors 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 Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

+1


source







All Articles