{"action":"created","issue":{"url":"https://api.github.com/repos/chenenyu/Router/issues/30","repository_url":"https://api.github.com/repos/chenenyu/Router","labels_url":"https://api.github.com/repos/chenenyu/Router/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/chenenyu/Router/issues/30/comments","events_url":"https://api.github.com/repos/chenenyu/Router/issues/30/events","html_url":"https://github.com/chenenyu/Router/issues/30","id":232797567,"number":30,"title":"help wanted: 如何自定义BrowserMatcher处理流程","user":{"login":"zhangchaoxu","id":2672164,"avatar_url":"https://avatars0.githubusercontent.com/u/2672164?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangchaoxu","html_url":"https://github.com/zhangchaoxu","followers_url":"https://api.github.com/users/zhangchaoxu/followers","following_url":"https://api.github.com/users/zhangchaoxu/following{/other_user}","gists_url":"https://api.github.com/users/zhangchaoxu/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangchaoxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangchaoxu/subscriptions","organizations_url":"https://api.github.com/users/zhangchaoxu/orgs","repos_url":"https://api.github.com/users/zhangchaoxu/repos","events_url":"https://api.github.com/users/zhangchaoxu/events{/privacy}","received_events_url":"https://api.github.com/users/zhangchaoxu/received_events","type":"User","site_admin":false},"labels":[{"id":508173626,"url":"https://api.github.com/repos/chenenyu/Router/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-06-01T08:08:42Z","updated_at":"2018-03-19T08:39:22Z","closed_at":"2018-03-19T08:39:22Z","author_association":"NONE","body":"目前发现当path是url路径(startwith http or https)的时候，会先尝试匹配有没有对于的schema，没有的话，则跳转打开系统默认浏览器。\r\n\r\n请教如何自定义无法匹配的path的时候，自己处理跳转逻辑，我希望用我app内置的webview来打开这个页面，而不是使用系统内置浏览器。\r\n\r\n谢谢"},"comment":{"url":"https://api.github.com/repos/chenenyu/Router/issues/comments/374137142","html_url":"https://github.com/chenenyu/Router/issues/30#issuecomment-374137142","issue_url":"https://api.github.com/repos/chenenyu/Router/issues/30","id":374137142,"user":{"login":"zhangchaoxu","id":2672164,"avatar_url":"https://avatars0.githubusercontent.com/u/2672164?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangchaoxu","html_url":"https://github.com/zhangchaoxu","followers_url":"https://api.github.com/users/zhangchaoxu/followers","following_url":"https://api.github.com/users/zhangchaoxu/following{/other_user}","gists_url":"https://api.github.com/users/zhangchaoxu/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangchaoxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangchaoxu/subscriptions","organizations_url":"https://api.github.com/users/zhangchaoxu/orgs","repos_url":"https://api.github.com/users/zhangchaoxu/repos","events_url":"https://api.github.com/users/zhangchaoxu/events{/privacy}","received_events_url":"https://api.github.com/users/zhangchaoxu/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T08:39:22Z","updated_at":"2018-03-19T08:39:22Z","author_association":"NONE","body":"非常感谢，贴上正常工作后的代码\r\n```\r\npublic class CustomBrowserMatcher extends AbsExplicitMatcher {\r\n\r\n    public CustomBrowserMatcher(int priority) {\r\n        super(priority);\r\n    }\r\n\r\n    @Override\r\n    public boolean match(Context context, Uri uri, @Nullable String route, RouteRequest routeRequest) {\r\n        return (uri.toString().toLowerCase().startsWith(\"http://\") || uri.toString().toLowerCase().startsWith(\"https://\"));\r\n    }\r\n\r\n    @Override\r\n    public Object generate(Context context, Uri uri, @Nullable Class<?> target) {\r\n        return super.generate(context, uri, BrowserActivity.class);\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"zhangchaoxu"}}