0

When we click on and pdf document file for open it, we see the 'OPEN WITH' dialog, as show below image screenshot, I want my app to appear in this 'OPEN WITH' dialog when opening PDF file from any app like file manager,

EX: This functionality used by adobe pdf viewer/ Drive Pdf viewer/other pdf reader app, for open file from any where.

  • This question is not clear at all, please edit and clarify. i cannot suggest any edit because I can't understand even after watching the pic. – Ezequiel Adrian Dec 04 '20 at 23:04

1 Answers1

1

I created "PdfOpener" activity and added an intent filter for it in the manifest. My app is called RoomWordsSample. The intent filter tells the android system that there is an activity within my app, called PdfOpener, that claims to have the capability of opening pdf files. So the android system trusts this claim and lists my app in the app chooser dialog box. Download the gif I uploaded on google drive, it shows before adding intent filter and after adding intent filter. The system only shows app chooser dialog box only if there is more than one app that can open pdf files. I took the code for the intent filter from this question intent-filter code.

Khoudnami
  • 56
  • 4