简体   繁体   中英

Share pdf file via my application on android

Hi I have to develop an application which should enable sharing of pdf files. I have to create a service wich puts my application as default for .PDF file sharing. 图片1图片2 As you can see on the picture I can share the pdf via bluetooth/Gmail/Drive...etc. I need to put there my application to. How can it be done? thanks :)

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. An example is given here . The mime type for pdf is 'application/pdf'.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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