diff --git a/osu.Android/OsuGameActivity.cs b/osu.Android/OsuGameActivity.cs index 130144d417..4623402b1a 100644 --- a/osu.Android/OsuGameActivity.cs +++ b/osu.Android/OsuGameActivity.cs @@ -6,15 +6,13 @@ using Android.OS; using Android.Views; using osu.Framework.Android; -using osu.Game; namespace osu.Android { [Activity(Theme = "@android:style/Theme.NoTitleBar", MainLauncher = true, ScreenOrientation = ScreenOrientation.SensorLandscape, SupportsPictureInPicture = false, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize, HardwareAccelerated = true)] public class OsuGameActivity : AndroidGameActivity { - protected override Framework.Game CreateGame() - => new OsuGame(); + protected override Framework.Game CreateGame() => new OsuGameAndroid(); protected override void OnCreate(Bundle savedInstanceState) { diff --git a/osu.Android/OsuGameAndroid.cs b/osu.Android/OsuGameAndroid.cs new file mode 100644 index 0000000000..d9bdd9c0c2 --- /dev/null +++ b/osu.Android/OsuGameAndroid.cs @@ -0,0 +1,14 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System; +using Android.App; +using osu.Game; + +namespace osu.Android +{ + public class OsuGameAndroid : OsuGame + { + public override Version AssemblyVersion => new Version(Application.Context.ApplicationContext.PackageManager.GetPackageInfo(Application.Context.ApplicationContext.PackageName, 0).VersionName); + } +} diff --git a/osu.Android/osu.Android.csproj b/osu.Android/osu.Android.csproj index 45ff8ba31a..6a859742ee 100644 --- a/osu.Android/osu.Android.csproj +++ b/osu.Android/osu.Android.csproj @@ -13,11 +13,9 @@ osu.Android Properties\AndroidManifest.xml - - true - +