Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share pdf file via my application on android

Tags:

android

pdf

share

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.picture1picture2 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 :)

like image 576
Csabi Avatar asked Dec 25 '22 16:12

Csabi


2 Answers

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

Go here, then check

4.3. Example: Register an activity for the share intent
like image 139
George Daramouskas Avatar answered Dec 30 '22 12:12

George Daramouskas


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'.

like image 25
Toon Borgers Avatar answered Dec 30 '22 10:12

Toon Borgers