Working with SD card in Windows Phone 8.1

BUSINESS CASE

We were working on one of our client’s app which had one of the primary features of Screen Recorder.

CLIENT CHALLENGE

Since one of the primary features of this app was screen recorder, so major challenge which we faced was saving the files and reading it. For this one option was to read and write files in the phone’s inbuilt memory but then the storage space was a major limitation factor. So option left with us was to read and write files in SD card.

WEBLINE SOLUTION

Below solution will work on Windows Phone 8.1 SDK, since before that Windows phone SDK supported only read access to SD card.

Let’s see how to read and write data on SD card in Windows Phone 8.1 app with an example.

To allow your App to read/write files in SD card you will have to set the Removable Storage capability in the app manifest file. You will also have to specify the type of files your application will access in the Declarations tab of the app manifest file.

Select File Type Associations from the drop-down and add the file type as shown below. ( To add multiple file types click on Add new button)