Windows Phone 8在“音乐”或“文档”文件夹中获取文件 [英] Windows phone 8 get files in folder Music or Documents

查看:89
本文介绍了Windows Phone 8在“音乐”或“文档”文件夹中获取文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从计算机上将C#文件下载到默认文件夹,并在Windows Phone 8上获取文档或音乐。

I want to get files on C# downloaded from computer to default folders Document or Music on windows phone 8. How can i get them, if it possible?

推荐答案

开发人员可以使用这两个文件夹,如 Windows Phone 8:媒体文件访问

Those two folders are available to a developer, as described in the answer on Windows Phone 8: Media file access

根据MSDN上的 Windows Phone数据页面,用于歌曲和图片的api似乎是
MediaLibrary。

The api for songs and pictures seems to be MediaLibrary according to the "Data for Windows Phone" page on MSDN.

它允许添加(SaveSong,SavePicture)和从库中删除歌曲和图片。

It allows to add (SaveSong, SavePicture) and Delete songs and pictures from the library.

要执行此操作,您需要功能在应用的清单中设置的 ID_CAP_MEDIALIB_AUDIO ID_CAP_MEDIALIB_PHOTO

To be able to do this, you need the Capability ID_CAP_MEDIALIB_AUDIO and ID_CAP_MEDIALIB_PHOTO set in the app's manifest.

可以通过文件访问示例

StorageFolder storageFolder = KnownFolders.DocumentsLibrary; 



下载文件



从以下位置下载文件计算机是一个完全不同的问题,需要您提供一些更多信息:

Downloading files

To download files from a computer is an entire different question and requires some more information from your end:


  • 您如何从计算机中下载文件

  • 计算机是否有文件共享服务器

  • 您要使用什么协议

  • ...

  • how do you want to download files from the computer
  • does the computer have a file sharing server
  • what protocol do you want to use
  • ...

如果您要为该计算机编写程序以将文件共享到手机,则这些 Windows Phone 8网络示例可以提供一些有关如何获取套接字,nfc,蓝牙的信息或在Windows Phone 8上运行的http。

If you are going to write a program for that computer to share files to your phone, then these Windows Phone 8 Networking Samples can provide some information on how to get sockets, nfc, bluetooth or http going on windows phone 8.

这篇关于Windows Phone 8在“音乐”或“文档”文件夹中获取文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆