开发者

How can I get the URL from the default browser to use in my custom browser?

I am developing an Android app in which a type of browser will be included. As the user tries to open a URL, an intent resolver asks the user whether they want to complete the action using the default browser or a custom browser. This part of my app is completed. Now I want to ask, if the user chooses to open the 开发者_开发问答link in my custom browser, how can I access that URL?

Currently, if the user chooses my browser they got blank web view, as I am unable to get the URL which I have to open in my webview.


If the user chooses to open the link in my custom browser, how can I access that URL?

Call getIntent().getData() to get the Uri the user is trying to open.


If your custom browser is starting in response to an intent, the target URL should be contained in that intent for you to extract.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜