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.
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 :)
Asked
Active
Viewed 8,075 times
4
Csabi
- 3,097
- 17
- 59
- 107
3 Answers
5
http://www.vogella.com/articles/AndroidIntent/article.html
Go here, then check
4.3. Example: Register an activity for the share intent
George Daramouskas
- 3,720
- 3
- 22
- 51
-
it is now under heading 3.2 – abdulwasey20 Mar 01 '21 at 12:28
4
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'.
Toon Borgers
- 3,638
- 1
- 14
- 22
1
I think you cannot force that, its totally on android system, thats why it pushes for a chooser with all the apps that has registered themselves as handler for specified data type, following which user can mark it as default or not.
Techfist
- 4,314
- 6
- 22
- 32
-
How can I register my app as default handler ? That should solve my problem – Csabi Dec 18 '13 at 09:21