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

217 views Asked by At

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

  1. FileExtensionVector
  2. FileOpenPicker
  3. PickerLocationId
  4. PickerViewMode

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.

1

There are 1 answers

2
Rob Caplan - MSFT On

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]