Skip to content Skip to sidebar Skip to footer

How To Load The Application In Web-view In A Specific Browser Like Chrome Or Firefox In Android

I am new to Android, i am doing an application where i need to load our existing application in Web-View on Tablet. In the Tablet when i load my application by using Web-View my ap

Solution 1:

In the Tablet when i load my application by using Web-View my application is getting loaded in default browser.

WebView is a widget that you place in the UI of one of your activities. It is not the default browser.

If you are calling loadUrl() on the WebView, and it is bringing up the default browser, that is because the Web server is issuing a redirect. You can add a WebViewClient to your app to handle this, as is discussed here: https://stackoverflow.com/a/8941605/115145

How can i load my application in a specific browser[like Chrome or Firefox] in Web-View on Tablet?

If you really do want to load content into a Web browser, you let the user choose what browser the user wishes to use. Typically, this will happen automatically when you launch a URL (e.g., via startActivity() on an ACTION_VIEWIntent) -- if there is more than one browser, and they have not set a default, the user will be presented with a chooser to pick which browser they wish to use.

Post a Comment for "How To Load The Application In Web-view In A Specific Browser Like Chrome Or Firefox In Android"