简体   繁体   English

WP7 —使用默认应用程序打开文件吗?

[英]WP7 — Open Files With the Default App?

I created a Windows Phone 7 app that downloads files from my server and stores them in isolated storage, but I'm having trouble finding any info about how to open files with other (default) apps. 我创建了一个Windows Phone 7应用程序,该应用程序从服务器下载文件并将其存储在隔离的存储中,但是我找不到任何有关如何使用其他(默认)应用程序打开文件的信息。

For instance, if I download a .psd file to isolated storage, what C# call do I have to write to make the system open said file in any available app that can read it? 例如,如果我将.psd文件下载到独立存储中,则必须编写什么C#调用才能使系统在任何可以读取该文件的应用程序中打开该文件? This can be done on other platforms (iOS, and Android), but I haven't found any literature on the subject for Windows Phone 7. 这可以在其他平台(iOS和Android)上完成,但是我还没有找到有关Windows Phone 7的任何文献。

Any help would be appreciated. 任何帮助,将不胜感激。

At this point, Windows Phone does not let you use any file associations. 此时,Windows Phone不允许您使用任何文件关联。 So, for example, if you download a PDF, even if the Adobe Reader is installed, you cannot launch the application with the file path as the parameter (yet, you can get the full file path from the Isolated Storage). 因此,例如,即使您下载了PDF,即使安装了Adobe Reader,也无法使用文件路径作为参数来启动应用程序(但是,您可以从独立存储中获取完整的文件路径)。 Your best bet would be having the online source available and passing it to a WebBrowserTask , that, if an association is present, will automatically open the appropriate application. 最好的选择是使在线资源可用并将其传递给WebBrowserTask ,如果存在关联,它将自动打开相应的应用程序。

因为Windows Phone 7仅允许您自己的应用读取您的隔离存储!您无法读取任何其他应用的隔离存储

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM