Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am developing an application where i m trying to move mp 4 file from local Folder to Sd card. I have done it on windows phone 8.1...Now i am developing it on windows phone 8...But it is giving error..

I got the Error on this below line.
C#
StorageFolder sdCard = (await KnownFolders.RemovableDevices.GetFoldersAsync()).FirstOrDefault();

And it's showing Error..
C#
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in System.Windows.ni.dll

And When I Add Watch then it check Exception e Argument and it showing...
C#
System.NotImplementedException: The method or operation is not implemented.
at Windows.Storage.KnownFolders.get_RemovableDevices()
Posted
Updated 10-Aug-14 19:10pm
v4

1 solution

Your question is a bit confusing because the subject refers to Windows Phone 8 but your question refers to Windows 8.1 and Windows 8. Please be cautious when asking questions about these things because there is both in the marketplace and they are very different beasts.

I'm going to assume that you mean Windows Phone 8 & Windows Phone 8.1. Unfortunately the answer is very simple and the error message is actually telling you this. Support for SD cards wasn't added until Windows Phone 8.1. That is why you get a NotImplementedException when you try to run it on Windows Phone 8... the SD card functions weren't implemented on that version.
 
Share this answer
 
Comments
Member 10976035 12-Aug-14 0:31am    
@Jason okkk .....can it possible to move data form local to phone memory?????
Member 10976035 12-Aug-14 0:38am    
StorageFolder phFolder = await KnownFolders.VideosLibrary.CreateFolderAsync("video12", CreationCollisionOption.ReplaceExisting);

This exception is occur when i run it..

{System.NotImplementedException: The method or operation is not implemented.
at Windows.Storage.KnownFolders.get_VideosLibrary()
Jason Gleim 12-Aug-14 10:53am    
It doesn't look like it. One of the BIG complaints in Windows Phone 8 (and 7/7.1 prior) was the utter lack of support for file system management. Because a "Windows Phone App" is really a Silverlight app (for the most part... there are exceptions) you were limited to Isolated Storage as the only location you could read/write to with very few exceptions.

I'll confess not to be an expert on the file system in Windows Phone 8.1 as it has just recently come out and I haven't really done anything there. I felt the limits as a pain point previously and I know this was something they really improved on in 8.1. That is likely why you are having success there and not on WP 8.

I hate to say it but I'm not very confident you are going to find a workaround for this. The sandbox around apps in Win Phone 7/8 is pretty tight. You may just have to make your app a Win Phone 8.1 and up app. But, keep trying and if you find something, write and post an article. It may help others.

Good luck.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900