sharee.bike-App/Meinkonrad/TINK.iOS/Device/ExternalBrowseService.cs

24 lines
617 B
C#
Raw Normal View History

2022-08-30 15:42:25 +02:00
using Foundation;
2021-11-07 19:42:59 +01:00
using TINK.iOS.Device;
2022-08-30 15:42:25 +02:00
using TINK.Model.Device;
2021-11-07 19:42:59 +01:00
using UIKit;
2022-08-30 15:42:25 +02:00
using Xamarin.Forms;
2021-11-07 19:42:59 +01:00
[assembly: Dependency(typeof(ExternalBrowseService))]
namespace TINK.iOS.Device
{
public class ExternalBrowseService : IExternalBrowserService
{
2022-08-30 15:42:25 +02:00
/// <summary> Opens an external browser. </summary>
/// <param name="p_strUrl">Url to open.</param>
public void OpenUrl(string p_strUrl)
2021-11-07 19:42:59 +01:00
{
2022-08-30 15:42:25 +02:00
var l_oUrl = NSUrl.FromString(p_strUrl);
if (l_oUrl == null)
return;
UIApplication.SharedApplication.OpenUrl(l_oUrl);
2021-11-07 19:42:59 +01:00
}
}
}