Commit Graph

109 Commits

Author SHA1 Message Date
76367444cb Adjust Android package versioning to .NET 6
With .NET 6, the way Xamarin package versioning works has changed.

- The `ApplicationVersion` MSBuild property aims to replace
  `android:versionCode` in the manifest.
- The `ApplicationDisplayVersion` MSBuild property aims to replace
  `android:versionName` in the manifest.

More about this can be read in Xamarin docs:

    ec712da8c1/Documentation/guides/OneDotNetSingleProject.md

To this end:

- Manual `version{Code,Name}` specs are removed from
  `AndroidManifest.xml`, as they were preventing MSBuild properties
  from functioning properly.
- `Version` now defaults to 0.0.0, so that local builds don't appear
  like they were deployed (see `OsuGameBase.IsDeployedBuild`).
- `ApplicationDisplayVersion` now defaults to `Version`.
  This addresses the Android portion of #21498.
- `ApplicationVersion` can now be specified by command line,
  but still needs to be supplied manually for version detection to
  work correctly. See `OsuGameAndroid.AssemblyVersion` for more info.

Putting the pieces together, the complete publish command to deploy
a new build should look something like so:

    dotnet publish -f net6.0-android \
                   -r android-arm64 \
                   -c Release \
                   -p:Version=2022.1228.0 \
                   -p:ApplicationVersion=202212280
2022-12-28 10:36:54 +01:00
36c620287b Remove no longer needed Linker.xml configurations for mobile projects 2022-12-19 18:11:05 +01:00
877413524f Cherry-picked android changes from #17462 2022-12-19 15:46:54 +09:00
34ad1e1d61 Fix Android linker removing System.Globalisation.*Calendar 2022-12-08 22:50:29 +01:00
00c11b2b4e Add partial specs in mobile projects too 2022-11-26 17:59:38 +01:00
38a8b9cf0a Add battery info for desktop platforms 2022-07-30 14:26:19 +02:00
cb1d60cd36 Include new file in compile 2022-07-15 11:57:05 +02:00
6995b34b08 Add Android joystick settings 2022-07-01 13:14:43 +02:00
345ae7bbc3 Fix build errors after implicit NRT enable 2022-06-21 00:46:52 +02:00
ee96d84ffa Merge branch 'master' into input-settings 2022-06-20 22:55:43 +02:00
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
214b2724de Merge branch 'master' into input-settings
# Conflicts:
#	osu.Game/OsuGameBase.cs
#	osu.iOS/OsuGameIOS.cs
2022-02-12 11:48:46 +01:00
84171962e5 Change name and add xmldoc 2022-02-03 13:55:04 +01:00
40953751b5 Use ScreenOrientation.FullUser on Android tablets 2022-02-03 13:29:37 +01:00
bfe6218ed5 Change default orientation to SensorLandscape 2022-02-01 12:43:58 +01:00
037e56f13e Add Android mouse settings 2022-01-15 14:53:41 +01:00
5b4ce7f11b Add explicit Exported = true 2021-12-24 18:57:08 +01:00
99481d2b77 Update OsuGameActivity and manifest in line with framework changes 2021-12-24 12:51:11 +01:00
badbbace10 Add android intent filter for osu! replays 2021-11-02 04:58:53 +03:00
f2d51200a5 Update android mime types in line with new specifications 2021-08-23 16:55:42 +09:00
c93533fa2e Bump Xamarin.Essentials from 1.6.1 to 1.7.0
Bumps [Xamarin.Essentials](https://github.com/xamarin/Essentials) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/xamarin/Essentials/releases)
- [Commits](https://github.com/xamarin/Essentials/compare/1.6.1...1.7.0)

---
updated-dependencies:
- dependency-name: Xamarin.Essentials
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 17:04:24 +00:00
a0fbf29b98 add application/x-osu-archive mime type to Android IntentFilters 2021-06-07 11:24:48 +02:00
43b97fe0ad Refactor PowerStatus (now called BatteryInfo) 2021-04-12 10:52:52 -04:00
08311abc5e Remove setters, cache CreatePowerStatus() and use a dummy LocalPowerStatus class in test scene 2021-04-10 00:00:21 -04:00
59d13b0dd3 Fixed indentation
sorry about the style fixes... I'm using JetBrains Rider from now on.
2021-04-08 21:53:42 -04:00
493c095535 Fixed code style 2021-04-08 20:28:23 -04:00
6bccb3aab6 Use DI to implement battery detection, add BatteryCutoff property
- Removed the Xamarin.Essentials package from osu.Game and added it to osu.iOS and osu.Android only.
- iOS and Android implementations use Xamarin.Essentials.Battery, while the Desktop implementation
only returns 100% battery for now.
- Added a BatteryCutoff property to PowerStatus so it can be different for each platform (default 20%, 25% on iOS)
2021-04-08 19:55:11 -04:00
0a6baf670e Send a warning notification if device is unplugged and low battery
- Uses Xamarin.Essentials in osu.Game.PlayerLoader to check battery level
- Encapsulated battery checking in the public BatteryManager class so battery level and plugged in status can be accessed and edited in TestPlayerLoader
- When checking battery level, catch NotImplementedException thrown by Xamarin.Essentials.Battery on non-mobile platforms
- Added visual unit tests for battery notification
  To mock battery status and level, we had to define a batteryManager object in TestPlayerLoader and add a new function ResetPlayerWithBattery()

Co-Authored-By: Marlina José <marlina@umich.edu>
2021-04-07 15:56:50 -04:00
eee3d83ed2 Disable sdk linker for android debug releases
Aimed to improve build time (especially for CI builds).

The additional lines come from visual studio. I'm intentionally
committing its output so it doesn't cause a diff on further csproj
changes.
2021-04-05 19:36:38 +09:00
6f01070408 Add weird android package requirements 2021-03-29 23:11:24 +09:00
02194a93cb Apply missing additions to android project 2021-03-08 15:22:03 +09:00
32556b1898 add Exported = true to Activity manifest 2021-02-20 02:32:44 +01:00
fed2dea735 remove unnecesary view intent filter 2021-02-10 18:13:59 +01:00
97e799a26b add more MIME types to Android share intent filter 2021-02-10 18:10:31 +01:00
153149554b add more mime types 2021-01-21 16:25:16 +01:00
4266c67bb6 Remove duplicated code path in switch. 2021-01-02 19:19:55 +01:00
324f80d994 Fix merge conflicts. 2021-01-02 19:14:10 +01:00
eb64e6bf4d Remove duplicate application/octet-stream 2020-12-30 23:35:07 +01:00
770a5a85df Merge Intent.ActionSend into one IntentFilter
Co-authored-by: Lucas A. <game4allyt@gmail.com>
2020-12-28 20:57:08 +01:00
d971aa5295 Remove file intents and add Send intent
Removed IntentFilters with DataScheme = "file"
Added Intent.ActionSend with application/octet-stream and application/zip
2020-12-28 15:54:21 +01:00
b352c1503f Fix IntentFilter capturing all file types
Removed string arrays and split the IntentFilter into multiple. Also added DataHost and DataMimeType
2020-12-28 15:13:33 +01:00
e9e0e18dc5 Fix missed change in merge conflict... 2020-12-27 14:11:30 +01:00
7ae4979882 Fix merge conflicts. 2020-12-27 13:52:45 +01:00
06bc3cd54d Apply review suggestions. 2020-12-24 00:17:26 +01:00
78b8c60f19 Opt for SingleInstance launch mode 2020-12-23 13:38:33 +01:00
ea5da53597 Handle URL links with the osu scheme. 2020-12-23 13:31:27 +01:00
9d89069245 Add ability to import multiple files at once on android. 2020-12-16 20:33:29 +01:00
5d7294451f Refactor Import() overload to take a list of import tasks instead. 2020-12-16 14:28:16 +01:00
d0668192aa Ensure stream disposal & move entire operation inside task 2020-12-15 21:25:53 +01:00
f9d7945a6f Remove non-functional replay import for now 2020-12-14 21:03:49 +01:00