开发者

open another browser in spite of default browser

开发者 https://www.devze.com 2023-01-21 05:49 出处:网络
hiii..i m developing an app in which as user click on a link it should prompt the user to open link in myAppbrowser (which i will create) or default browser(like activity chooser do).

hiii..i m developing an app in which as user click on a link it should prompt the user to open link in myAppbrowser (which i will create) or default browser(like activity chooser do). as user click on default brows开发者_开发问答er app prompt again that, 'this page cant open in default browser'. after that the browser which i make should run...

how to implement this....plz help me


Depends.

If the user clicks on your link, from one of the browsers (which aren't made by yourself), then no: It's not possible for security reasons. Android is designd to have the user choose which app he want's to use to open a certain Link (better term would be: Intent).

If the user clicks on a link in a WebView you created, then it may be possible to intercept that link and create a custom selection screen (or directly send it to your App without asking for a choice). I've forgot which method of WebView you need to override to intercept link clicks, have seen it somewhere here on Stackoverflow, just don't have the link atm.

0

精彩评论

暂无评论...
验证码 换一张
取 消