本文介绍了将文件保存到 WP8 设备上的特定位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Windows Phone 8 开发的新手.想知道是否有办法将收到的文件存储到设备上的特定位置.它可以通过 ActiveSync 或 MDM 使用 API.

I am new to Windows Phone 8 development. Would like to know if there is a way to store a file received to a particular location on device. It could be using an API, through ActiveSync or MDM.

提前致谢.

推荐答案

Windows Phone 8 不允许免费直接访问用户的硬盘来读取或写入文件.您必须使用特定于用例的 API,具体取决于您尝试存储的媒体类型.我过去回答过一个类似的问题,关于 WP8 对已知文件类型的读写访问@ Windows Phone 8:媒体文件访问

Windows Phone 8 doesn't allow for free-for-all direct access to the user's hard-drive to read or write files. You'll have to use usecase specific APIs depending on the type of media you're trying to store. I've answered a similar question in the past regarding WP8's read-write access for known file types @ Windows Phone 8: Media file access

一些亮点:

  1. 您的应用程序可以使用 IsoStore 来读取 &写入只能由您的应用程序访问的文件.请参阅 IsolatedStorageFile API 或 ApplicationData.当前.LocalFolder API.

  1. Your app can use IsoStore to read & write files only accessable to your app. See IsolatedStorageFile API or ApplicationData.Current.LocalFolder API for that.

您可以使用 MediaLibrary.SavePicture 或 MediaLibrary.SavePictureToCameraRoll 方法.

You can store pictures using MediaLibrary.SavePicture or MediaLibrary.SavePictureToCameraRoll methods.

您可以使用 MediaLibraty.SaveSong 方法存储歌曲.

You can store songs using MediaLibraty.SaveSong method.

除此之外,我从头顶上对操作系统的任何其他文件写入 API 都不熟悉.您可能可以使用远程服务器,但仅此而已.

Other then those APIs I'm not familiar with any other file write APIs to the OS from the top of my head. You can probably use a remote server, but that's pretty much it.

这篇关于将文件保存到 WP8 设备上的特定位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 11:58