-
Notifications
You must be signed in to change notification settings - Fork 696
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
Adding Uri exclusion list for making some redirect URI to be considered as Universal Links #1111
Comments
Have you looked SetURLPattern()? #550 shows its brief usage. |
Yes, I had taken a look at this before. I do have a question on that. public boolean shouldOverrideUrlLoading(WebView view, String url) { It looks like it returns true. Where I was expecting that |
The |
I see ! The webview gives me a callback on when an Url is hooked. Let me try that. Appreciate the help. |
Hello again, as a followup on my previous question : Calling Application.OpenURL(url) in the callback of OnHooked on Android platform calls the deeplinks by default. However on iOS it doesnt take the same deeplink flow, rather it opens up a web browser unfortunately. |
For iOS, how does it work if not calling SetURLPattern()? I guess WKWebView handles a universal link adequately. You can then use If a universal link targets your app itself, you can utilize SetURLPattern() to hook the link and process it adequately in the |
So from the Apple iOS documentation, it looks like if the WkWebview is opening a different scheme type then it supposedly opens the link as universal link. For all other requests like https:// redirects, the WkWebview loads itself. You have to create an activity like this on the objective c code to activate universal links on iOS side. `
I'd like to hear your thoughts on supporting this on Gree. Do you think there is a benefit for adding this feature in Gree plugin ? |
Your code seems to have some errors, but I hope I could understand it correctly... If we try to treat every https link as a universal link, it should have large overheads. It is better to utilize SetURLPattern() to hook universal links and invoke a separate method that performs your code. I pushed modified code/binaries to https://github.com/gree/unity-webview/commits/experimental/openuniversallink/ . Though I haven't tested it, it should be utilized as a replacement for Application.OpenURL(). |
Hi , the code snippets meant to give an example for how we should activate universal link using user activity. It is not meant to assume all links or https as universal links. Thanks for updating the binaries, I’ll definitely take a look at and it and try out. |
I've further updated the branch so could you please pull its latest. |
Hello,
We have been using the Gree plugin for unity for both Android and iOS. One of the things we encountered is that our redirect URIs are Universal Links(iOS) / Deeplinks(Android). That means whenever we encounter such links we would like to have the Android/iOS to trigger an Intent/Activity respectively on each platform.
Currently Gree plugin opens the redirect Uri on the webview itself and we'd like to have Gree create the Intent/Activity calls for platforms.
For that I have modified the plugin to provide an API where one could add an Uri to an exclusion list and whenever there is an Uri with Protocol://your.domainname.com/ comes in it'd call the deeplink in the phone.
I want to create a pull request for your review. I was wondering if you have any suggestion or recommendation to handle this scenario. Please let me know.
The text was updated successfully, but these errors were encountered: