File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 <RuntimeIdentifiers >android-x86;android-arm;android-arm64</RuntimeIdentifiers >
55 <AndroidPackageFormat >apk</AndroidPackageFormat >
66 <MandroidI18n >CJK;Mideast;Rare;West;Other;</MandroidI18n >
7- <AndroidHttpClientHandlerType >Xamarin.Android.Net.AndroidMessageHandler, Mono.Android </AndroidHttpClientHandlerType >
7+ <AndroidHttpClientHandlerType >Xamarin.Android.Net.AndroidMessageHandler</AndroidHttpClientHandlerType >
88 <!-- NullabilityInfoContextSupport is disabled by default for Android -->
99 <NullabilityInfoContextSupport >true</NullabilityInfoContextSupport >
1010 <EmbedAssembliesIntoApk >true</EmbedAssembliesIntoApk >
2626 <SuppressTrimAnalysisWarnings >true</SuppressTrimAnalysisWarnings >
2727 </PropertyGroup >
2828 <ItemGroup >
29+ <!-- IMPORTANT: ppy.osu.Framework.Android v2026.318.0 only ships net8.0-android34.0 assets.
30+ NuGet silently falls back to those assets when the app targets net10.0-android (API 36).
31+ This is safe because .NET guarantees backward compatibility for loading net8.0 assemblies
32+ in a net10.0 runtime, and Android API changes between 34→36 are additive.
33+ TODO: Remove this comment once ppy.osu.Framework.Android ships net10.0-android assets. -->
2934 <PackageReference Include =" ppy.osu.Framework.Android" Version =" 2026.318.0" />
3035 </ItemGroup >
3136 <PropertyGroup >
Original file line number Diff line number Diff line change @@ -73,6 +73,13 @@ protected override void OnCreate(Bundle? savedInstanceState)
7373 {
7474 base . OnCreate ( savedInstanceState ) ;
7575
76+ // Initialise MAUI Essentials so that Battery, Connectivity and other platform
77+ // APIs can resolve the current Activity/context. Without this call the
78+ // BroadcastReceivers registered in the merged manifest (BatteryBroadcastReceiver,
79+ // EnergySaverBroadcastReceiver, ConnectivityBroadcastReceiver) will crash on
80+ // first use because the internal Platform.CurrentActivity is null.
81+ Microsoft . Maui . ApplicationModel . Platform . Init ( this , savedInstanceState ) ;
82+
7683 // OnNewIntent() only fires for an activity if it's *re-launched* while it's on top of the activity stack.
7784 // on first launch we still have to fire manually.
7885 // reference: https://developer.android.com/reference/android/app/Activity#onNewIntent(android.content.Intent)
@@ -116,6 +123,12 @@ protected override void OnCreate(Bundle? savedInstanceState)
116123
117124 protected override void OnNewIntent ( Intent ? intent ) => handleIntent ( intent ) ;
118125
126+ public override void OnRequestPermissionsResult ( int requestCode , string [ ] permissions , Permission [ ] grantResults )
127+ {
128+ Microsoft . Maui . ApplicationModel . Platform . OnRequestPermissionsResult ( requestCode , permissions , grantResults ) ;
129+ base . OnRequestPermissionsResult ( requestCode , permissions , grantResults ) ;
130+ }
131+
119132 private void handleIntent ( Intent ? intent )
120133 {
121134 if ( intent == null )
You can’t perform that action at this time.
0 commit comments