Skip to content

Commit

Permalink
feat: Basic Launcher.OpenUriAsync support on Skia
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Feb 9, 2021
1 parent 38dcd9a commit a3dada5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public LauncherTests()

public class LauncherTestsViewModel : ViewModelBase
{
private string _uri;
private string _uri = "https://platform.uno";
private string _error;
private LaunchQuerySupportStatus _supportResult;

Expand Down
14 changes: 11 additions & 3 deletions src/Uno.UWP/System/Launcher.Skia.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Uno.Foundation;

namespace Windows.System
{
public static partial class Launcher
{
public static async Task<bool> LaunchUriPlatformAsync(Uri uri)
public static Task<bool> LaunchUriPlatformAsync(Uri uri)
{
throw new NotImplementedException();
var processStartInfo = new ProcessStartInfo(uri.OriginalString)
{
UseShellExecute = true,
Verb = "open"
};

var process = new Process();
process.StartInfo = processStartInfo;
return Task.FromResult(process.Start());
}
}
}
2 changes: 1 addition & 1 deletion src/Uno.UWP/System/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static partial class Launcher

public static Task<bool> LaunchUriAsync(Uri uri)
{
#if __IOS__ || __ANDROID__ || __WASM__ || __MACOS__
#if __IOS__ || __ANDROID__ || __WASM__ || __MACOS__ || __SKIA__

if (uri == null)
{
Expand Down

0 comments on commit a3dada5

Please sign in to comment.