Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a1df7ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code will cause phones without browsers to crash.
use this instead
a1df7ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code I posted will try to open the links in the appropriate app, if it fails it goes to the browser, and then comes back to our app to open it. If it won't open it due to not having a browser and not being in the whitelist, it shows a toast message saying that the link was blocked.
a1df7ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just for clarity uri.Parse is lowercase
a1df7ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I am using the newer version of webview that uses WebResourceRequest which already includes the url as a URI, so i just rewrote that script a bit, however the rest of the code was tested.
a1df7ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just tested it on a android 4.4
and it still crashes
ok on android 6 it works