Links in WebView open in Chrome

Heya,

A few of my apps use WebViews, which are automatically signed-in to our admin site.

When the users click a button to print a PDF, or to view a PDF, it attempts to open the PDF in Chrome (or download it which would be fine except it still tries to open in Chrome), users are not logged in on Chrome, only within the app itself.

(I am locking down our devices and we don’t want users to have access to Chrome.)

Is there a way to either;

  1. Prevent a link from opening in Chrome (and maybe even open the print dialog box), or
  2. Allow the app to view/ print the PDF that is trying to download or open which would normally just display in the browser?

Is there any android.permissions I can add (I use a 3rd party APK editor) to help with this?

I appreciate Thunkable is not here to deal with print queries, but this isn’t really about that, it’s more about preventing these links opening in Chrome and using the app’s WebView instead.

Thank you.

1 Like

Apparently the function is potentially available: Printing HTML documents  |  Android Developers, not 100% on that though.

I’m guessing it’s just not possible without creating a custom webview with a menu/ bar in which one would have to build the functions in(?)

1 Like

You could pass the pdf link from the webviewer to the app and then open the link using the built in pdf viewer but you’d need access to the website code itself.

1 Like