Adapting for use with Windows Phone ExternalStorageFile

Dec 16, 2013 at 12:37 AM
Interesting project! Just stumbled upon this while trying to find a solution to a problem I have with Windows Phone 8...

I want to be able to access a read-only file from the SD card and am required to use the ExternalStorageFile class in order for Windows Phone to allow me actual access to the file. I'm wondering how easy it would be for me to adapt this project to allow this. Any insights / thoughts?

I'd use RaptorDB as-is to create the storage file containing 100,000's of png files, then use the adapted version on Windows Phone to read the file from the SD card.

If you're curious and want a bit more background, here's my question looking for a solution on StackOverflow. Also explains why I can't use SQLite due to lack of support for ExternalStorageFile.

Dec 16, 2013 at 4:59 AM
Thanks Gavin,

Honestly I am at a loss why MS doesn't seem to think a file is a file regardless of where it is... and you have to use some other class than System.IO.File etc.

My only comment is try to replace the System.IO.File in the source with the above class.

Good Luck :)
Dec 16, 2013 at 6:11 AM
Cheers Mgholam. Could be interesting - had a quick dig around and could be fun and games getting it to work with the ExternalStorageFile.OpenForReadAsync method. I am debating weather to give it a go though, or just try and code something simple up from scratch.

MS does seem to have imposed some hurdles to jump over with Windows Phone development - hit quite a few unexpected limitations so far that you have no idea exist until you start hitting strange errors and have to start digging deeper.