使我的xamarin表单应用程序能够打开特定的文件类型?

问题描述:

我正在使用Xamarin表单(EPUB阅读器)构建我的第一个应用程序.核心应用程序现在运行良好,并且能够呈现文档.我想回答的问题是如何注册我的应用程序作为EPUB文档类型的处理程序,以便从电子邮件应用程序打开文件时,我的阅读器应用程序可以用作阅读器?

I am building my first app with Xamarin forms, an EPUB reader. The core app is now working well and able to render documents. The question I am trying to answer is how I can register for my app as a handler for the EPUB document type so that if the file is opened from an email app my reader app will be available as a reader?

理想情况下,这应该是跨平台的解决方案.

Ideally this should be a cross platform solution.

谢谢!

理想情况下,这应该是跨平台的解决方案.

Ideally this should be a cross platform solution.

不幸的是,没有可用于注册以读取文件类型的跨平台解决方案.

Unfortunately, there is no cross platform solution that you can use to register to read the file types.

您将需要遵循平台规范,iOS https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/custom-document-types/

You will need to follow the platform specifications for that, iOS https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/custom-document-types/

Android https://gist.github.com/brendanzagaeski/70afe08654927befb26b