public Task OpenApp(string appScheme, string deepLinkingUrl, string browserUrl) { return(_mainThread.InvokeOnMainThreadAsync(async() => { var supportsUri = await _launcher.CanOpenAsync(appScheme); if (supportsUri) { await _launcher.OpenAsync(deepLinkingUrl); } else { await OpenBrowser(browserUrl); } })); }
public static Task <bool> CanOpenAsync(this ILauncher launcher, string uri) => launcher.CanOpenAsync(new Uri(uri));