user2371189
user2371189

Reputation: 1

Writing to Documents folder on Windows Phone with Phonegap

I'm writing an app using Phonegap 2.9 with the Windows Phone 7 template to run on a Windows Phone 8 system. All features I need seem to work including saving of the file to the application's sandboxed location.

However, I need to save the the file to the Documents directory where the user can copy off the file on their computer. I've seen examples of how to do this natively using .Net specific objects.

How can I accomplish this with Phonegap? I have been unsuccessful in finding an example.

Upvotes: 0

Views: 976

Answers (1)

Benoit Catherinet
Benoit Catherinet

Reputation: 3345

The "examples of how to do this natively using .Net specific objects" that you saw were probably targeted at windows 8 not windows phone because as you can see here :

Windows Phone 8

This API is not implemented and will throw an exception if called.

so even with native code I don't think it's possible to save file in the Documents directory in windows phone.

You can also see the response here stating that it's not possible.

Another option would be to also create a desktop app to transfer file between your phone app and the dektop app which will do the save on the computer but that's a lot more complicated than using skydrive and would require each user to install the desktop app ... Regarding skydrive you can either do the comunication using the REST api that you can find info here or you could easily create a phone gap plugin and use the managed apis

Upvotes: 1

Related Questions