简体   繁体   English

通过Android上的应用程序共享pdf文件

[英]Share pdf file via my application on android

Hi I have to develop an application which should enable sharing of pdf files. 嗨,我必须开发一个应该能够共享pdf文件的应用程序。 I have to create a service wich puts my application as default for .PDF file sharing. 我必须创建一个服务,将我的应用程序作为.PDF文件共享的默认设置。 图片1图片2 As you can see on the picture I can share the pdf via bluetooth/Gmail/Drive...etc. 正如您在图片中看到的,我可以通过蓝牙/ Gmail /云端硬盘等分享PDF格式。 I need to put there my application to. 我需要把我的申请放在那里。 How can it be done? 如何做呢? thanks :) 谢谢 :)

http://www.vogella.com/articles/AndroidIntent/article.html http://www.vogella.com/articles/AndroidIntent/article.html

Go here, then check 去这里,然后检查

4.3. Example: Register an activity for the share intent

You need to register it as a reciever for the SEND action. 您需要将其注册为SEND操作的接收方。 An example is given here . 这里给出一个例子。 The mime type for pdf is 'application/pdf'. pdf的mime类型是'application / pdf'。

我认为你不能强迫它,它完全在Android系统上,这就是为什么它推动选择器与所有已经注册为指定数据类型的处理程序的应用程序,然后用户可以将其标记为默认值。

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

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