ligi / PassAndroid

Android App to view passes
GNU General Public License v3.0
809 stars 136 forks source link

PassAndroid opens PDF from browser directly #474

Open spaetz opened 1 year ago

spaetz commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

Crashillo commented 1 year ago

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: https://github.com/ligi/PassAndroid/blob/ce1c46b8aad8011940f626b67b250c690a6b8e22/android/src/main/AndroidManifest.xml#L560-L605

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

Scumpeter commented 1 year ago

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

spaetz commented 1 year ago

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?