Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Oct 24, 2024
1 parent 2aa6e48 commit 1a5f04e
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,29 @@ protected async override void OnStart()

await deviceCoordinator.ApplyTheme(AppInfo.Current.RequestedTheme is AppTheme.Dark);

#if Android

//+:cnd:noEmit
//#if (framework == 'net9.0')
const int minimumSupportedWebViewVersion = 94;
//#elif (framework == 'net8.0')
//#if (IsInsideProjectTemplate)
/*
//#endif
const int minimumSupportedWebViewVersion = 83;
//#if (IsInsideProjectTemplate)
*/
//#endif
//#endif
//-:cnd:noEmit
#if Android

if (Version.TryParse(Android.Webkit.WebView.CurrentWebViewPackage?.VersionName, out var webViewVersion) &&
webViewVersion.Major < 94)
webViewVersion.Major < minimumSupportedWebViewVersion)
{
await App.Current!.Windows.First().Page!.DisplayAlert("Boilerplate", localizer[nameof(AppStrings.UpdateWebViewThroughGooglePlay)], localizer[nameof(AppStrings.Ok)]);
await Launcher.OpenAsync($"https://play.google.com/store/apps/details?id={Android.Webkit.WebView.CurrentWebViewPackage.PackageName}");
}
#endif
//+:cnd:noEmit
//#endif
}
catch (Exception exp)
{
Expand Down

0 comments on commit 1a5f04e

Please sign in to comment.