How to share files created by the application?

How to share files (music, video, image) using my application? I am interested in sharing audio files.

Suppose I have a program that generates a wav file. How to get it from isolated storage?

Can I send an attachment with email? Save it to SkyDrive? Share on Facebook? Put it in a media library?

At least in a user-friendly way to get it out of your WP7 device?

Any help on this topic would be welcome.

+4
source share
2 answers

You cannot directly send it as an attachment via EmailComposerTask, however you can use your own implementation of the email sending mechanism.

You can save it to SkyDrive, but then for this you must use a custom API level (developed by you or a third-party).

The best choice, in my opinion, would be to have a WCF service that will transfer an array of bytes of generated content to a specific location - this will ultimately give you more control over the transfer level.

+1
source

You can save images to MediaLibrary - from where you can access it through Zune software and go to PC, etc.
This can be done using the MediaLibrary.SavePicture method. (Yes, this is an XNA method, but it can also be used from a Silverlight application.)

Another option is to upload it to a web server and send it from there.

There is currently no way to save songs or movies.

How to upload a file to a web server very much depends on: the server; software in which it works; and any security issues related to the implementation of the content.
The discussion on this issue begins on loading XML files from WP7, perhaps, like so on?

+1
source

Source: https://habr.com/ru/post/1338521/


All Articles