Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open a webpage without using webview

I'd like to open a webpage using the webbrowser on the device. Right now I use a WebView, but I want to let the user choose between Chrome, Safari or any other webbrowser currently on the device. Is there any way to do this?

like image 418
Thomas Avatar asked Dec 06 '22 23:12

Thomas


1 Answers

var url = "http://www.google.com";
Device.OpenUri(new Uri(url));

And this uses the default browser to open the url.

Source: https://forums.xamarin.com/discussion/comment/94202#Comment_94202

API Docs: Xamarin.Forms.Device.OpenUri

like image 66
Thomas Avatar answered Dec 23 '22 22:12

Thomas