tauri-apps / plugins-workspace

All of the official Tauri plugins in one place!
https://tauri.app
Apache License 2.0
734 stars 196 forks source link

Does the deep link plugin support custom schemes on android? #1313

Open ii41 opened 1 month ago

ii41 commented 1 month ago

Reading the official Android deep link documentation, they appear to support custom deep link schemes. The HTTP/HTTPS schemes are actually called web links instead. With non-HTTP/HTTPS deep link schemes no internet connection or verification is needed. Reading the README of the deep link plugin, it seems that at this moment it only supports custom schemes on desktop.

ii41 commented 1 month ago

I went to check the code, the android scheme is hardcoded to be http/https:

https://github.com/tauri-apps/plugins-workspace/blob/463f5971eb7b5aa14dd62d7953b51c523447044b/plugins/deep-link/build.rs#L19-L20

Additionally, it's hardcoded that the platform will always verify the host: an intent filter marked with android.intent.category.BROWSABLE will require Android to verify host when the scheme is http/https, and here the intent filter is indeed marked with it.

This isn't very friendly to developers...

ii41 commented 1 month ago

I'll see if I can make a PR. I've never written code for a plugin though.