Windows Phone 8:媒体文件访问 [英] Windows Phone 8: Media file access

查看:23
本文介绍了Windows Phone 8:媒体文件访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过 Windows Phone 8 中的默认音频/视频文件夹访问音频和视频文件?我已经检查了这个文档,但所有方法(例如KnownFolders.MusicLibrary)都没有在WP8上实现:http://msdn.microsoft.com/en-us/library/windows/apps/hh967755.aspx

Are there means to access audio and video files from the default audio/video folders in Windows Phone 8? I already checked this document but all methods (for instance KnownFolders.MusicLibrary) are not implemented on the WP8: http://msdn.microsoft.com/en-us/library/windows/apps/hh967755.aspx

我需要访问原始文件数据.如果无法从 C# 访问数据,也可以从 Windows Phone 运行时或纯 C++ 访问数据.

I need access to the raw file data. It would also be fine to access the data from a Windows Phone Runtime or from pure C++ if it's not possible from C#.

推荐答案

KnownFolders 不适用于 WP8 的 3rd 方应用程序.

KnownFolders doesn't work on WP8 for 3rd party apps.

就 WP8 的访问而言,以下是可用的:

In terms of access on WP8 here's what's available:

  • 联系人:从 WP7.5 开始提供读取访问权限,通过 WP8 ContactStore 提供写入访问权限.
  • 约会:从 WP7.5 开始提供读取访问权限.在 WP8 中,您可以在用户确认后通过 SaveAppointmentTask 添加个人约会.
  • 照片:对自 WP7 起所有可用文件夹的读取权限.自 WP7.5 起可写入相机胶卷和保存的图片.
  • 音频:从 WP7 开始,开发人员可以遍历音乐库,甚至可以通过本机播放器播放.启动 WP8 的开发人员可以使用 MediaLibraryExtensions.SaveSong() 将歌曲添加到音乐库中.
  • 视频:读写不可用.传输这么大的文件存在安全和存储问题.
  • uSD 卡:启动 WP8 应用程序可以注册特定的文件扩展名并从 micro-SD 卡中读取这些文件.
  • 文档:无读写访问权限.但是启动 WP8 的开发人员可以使用 Launcher.LaunchFileAsync 打开 docx/xlsx/etc 文件,它将在 Office 中打开只读副本.然后,用户可以选择将该副本保存在 Office Hub 中.
  • Contacts: Read access available since WP7.5, write-access available via WP8 ContactStore.
  • Appointments: Read-access available since WP7.5. In WP8 you can add individual appointments after user confirmation via the SaveAppointmentTask.
  • Photos: Read access to all folders available since WP7. Write-access to Camera Roll and Saved Pictures available since WP7.5.
  • Audio: Developers can iterate over the music library and even play it via the native player since WP7. Starting WP8 developers can add songs to the music library using MediaLibraryExtensions.SaveSong().
  • Video: Read-write isn't available. There are security and storage issue with transporting files that big.
  • uSD Card: Starting WP8 apps can register for specific file extensions and read those from the micro-SD card.
  • Documents: No read-write access. But starting WP8 developers can open up docx/xlsx/etc files using Launcher.LaunchFileAsync and it will open up a read-only copy in Office. Users can then choose to save that copy in the Office Hub.

我已将此帖子设为 Wiki,因此如果有任何其他区域,请随时编辑和添加这些要点.

I've made this post a wiki so if there are any additional areas, feel free to edit and add those bullet points.

这篇关于Windows Phone 8:媒体文件访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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