sharee.bike-App/LastenradBayern/ShareeBike.iOS/Device/ExternalBrowseService.cs
2024-04-09 12:53:23 +02:00

23 lines
557 B
C#

using Foundation;
using ShareeBike.iOS.Device;
using ShareeBike.Model.Device;
using UIKit;
using Xamarin.Forms;
[assembly: Dependency(typeof(ExternalBrowseService))]
namespace ShareeBike.iOS.Device
{
public class ExternalBrowseService : IExternalBrowserService
{
/// <summary> Opens an external browser. </summary>
/// <param name="p_strUrl">Url to open.</param>
public void OpenUrl(string p_strUrl)
{
var l_oUrl = NSUrl.FromString(p_strUrl);
if (l_oUrl == null)
return;
UIApplication.SharedApplication.OpenUrl(l_oUrl);
}
}
}