mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-25 08:36:27 +01:00
23 lines
678 B
C#
23 lines
678 B
C#
|
using TINK.Model.Device;
|
|||
|
using TINK.Droid.Model.Device;
|
|||
|
using Android.Content;
|
|||
|
using Xamarin.Forms;
|
|||
|
|
|||
|
[assembly: Dependency(typeof(ExternalBrowseService))]
|
|||
|
namespace TINK.Droid.Model.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 uri = Android.Net.Uri.Parse(p_strUrl);
|
|||
|
var intent = new Intent(Intent.ActionView, uri);
|
|||
|
|
|||
|
intent.AddFlags(ActivityFlags.NewTask);
|
|||
|
|
|||
|
Android.App.Application.Context.StartActivity(intent);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|