Skip to content

PassAndroid opens PDF from browser directly #474

Open

Description

@spaetz

PassAndroid 3.7.3 (but this has been an issue for a long time). When opening a pdf file from Firefox, it is directly imported and opened by PassAndroid without ever asking.
I have multiple other applications which can handle PDFs.

When saving the PDF and opening it from the file manager, I do get asked which application to use.

So I guess PassAndroid takes over the URL handler for pdf files as the sole handler? If there is anything I can do to debug things, let me know.

Thanks for PassAndroid, I am enjoying it very much!

Activity

  1. rivaldi8 commented on Jun 3, 2023

    @rivaldi8
    Contributor

    This also happens to me, but it seems it's Firefox's fault. If I try with Chrome it asks me to choose an application. Could you try it?

  2. spaetz commented on Jun 4, 2023

    @spaetz
    Author

    Yeah, Chrome opens pdfs in a different app (it does not ask me either). That is weird, but apparently not Passandroid's fault then... Feel free to close unless someone finds a solution.

  3. ligi commented on Jun 7, 2023

    @ligi
    Owner

    maybe open a issue in the firefox app then? Guess they are not using the intent system in this case.

  4. Crashillo commented on Jun 16, 2023

    @Crashillo

    In my device I notice that PassAndroid, apart from other hosts as mobile.aegeanair.com, m.aircanada.ca, etc... has also another compatible link: *. Looking at the manifest I see this:

    <!-- pdf -->
    <intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data
    android:host="*"
    android:pathPattern="/.*\\.pdf"
    android:scheme="http"/>
    </intent-filter>
    <intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data
    android:host="*"
    android:pathPattern="/.*\\.pdf"
    android:scheme="https"/>
    </intent-filter>
    <intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data
    android:host="*"
    android:pathPattern="/.*\\.pdf"
    android:scheme="file"/>
    </intent-filter>
    <intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data
    android:host="*"
    android:pathPattern="/.*\\.pdf"
    android:scheme="content"/>
    </intent-filter>

    So I believe Android understands that all pdf files, no matter which host they come from, should be open automatically using PassAndroid

  5. Scumpeter commented on Jul 22, 2023

    @Scumpeter
  6. spaetz commented on Sep 24, 2023

    @spaetz
    Author

    Current Fennec opens pdfs directly within Firefox and offers a 'Download' and 'Open in App' button. Both work as expected, so the issue has been solved for me. Should I close this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions