mirror of
https://github.com/manos555555/PS5-Suite.git
synced 2026-10-17 19:01:02 +02:00
- IncludeNativeLibrariesForSelfExtract: fixes DllNotFoundException (SkiaSharp) in single-file publishes on .NET 10 (issue #10) - Startup update check: compares latest GitHub release tag against the running version; prompt + "open download page" only when newer — desktop opens browser, Android uses Intent via AppPaths.UrlOpener - Version bump to 7.2.4 across desktop/Android/payload Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
using Android.App;
|
|
using Android.Content.PM;
|
|
using Avalonia;
|
|
using Avalonia.Android;
|
|
|
|
namespace PS5SuiteAndroid.Android;
|
|
|
|
[Activity(
|
|
Label = "PS5 Suite",
|
|
Theme = "@style/MyTheme.NoActionBar",
|
|
Icon = "@drawable/icon",
|
|
MainLauncher = true,
|
|
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
|
|
public class MainActivity : AvaloniaMainActivity<App>
|
|
{
|
|
protected override void OnCreate(global::Android.OS.Bundle? savedInstanceState)
|
|
{
|
|
// Expose user-browsable writable dirs to the shared library before
|
|
// Avalonia starts (Android/data/<pkg>/files — no permission needed).
|
|
PS5SuiteAndroid.AppPaths.DownloadsDirProvider =
|
|
() => GetExternalFilesDir(null)?.AbsolutePath ?? FilesDir!.AbsolutePath;
|
|
PS5SuiteAndroid.AppPaths.CacheDirProvider =
|
|
() => CacheDir!.AbsolutePath;
|
|
PS5SuiteAndroid.AppPaths.UrlOpener = url =>
|
|
{
|
|
try
|
|
{
|
|
StartActivity(new global::Android.Content.Intent(
|
|
global::Android.Content.Intent.ActionView,
|
|
global::Android.Net.Uri.Parse(url)));
|
|
}
|
|
catch { }
|
|
};
|
|
base.OnCreate(savedInstanceState);
|
|
}
|
|
|
|
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
|
{
|
|
return base.CustomizeAppBuilder(builder)
|
|
.WithInterFont();
|
|
}
|
|
}
|