Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PassAndroid opens PDF from browser directly #474

Open
spaetz opened this issue May 31, 2023 · 6 comments
Open

PassAndroid opens PDF from browser directly #474

spaetz opened this issue May 31, 2023 · 6 comments

Comments

@spaetz
Copy link

spaetz commented May 31, 2023

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!

@rivaldi8
Copy link
Contributor

rivaldi8 commented Jun 3, 2023

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?

@spaetz
Copy link
Author

spaetz commented Jun 4, 2023

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.

@ligi
Copy link
Owner

ligi commented Jun 7, 2023

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

@ligi ligi added the discussion label Jun 7, 2023
@Crashillo
Copy link

Crashillo commented Jun 16, 2023

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

@Scumpeter
Copy link

Scumpeter commented Jul 22, 2023

Someone opened a bug for Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1839794

@spaetz
Copy link
Author

spaetz commented Sep 24, 2023

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
Projects
None yet
Development

No branches or pull requests

5 participants