sharee.bike-App/Meinkonrad/TINK.Android/Model/Device/ExternalBrowseService.cs
Anja Müller-Meißner 573fe77e12 Version 3.0.337
2022-08-30 15:42:25 +02:00

23 lines
No EOL
690 B
C#

using Android.Content;
using TINK.Droid.Model.Device;
using TINK.Model.Device;
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);
}
}
}