Skip to content

Commit

Permalink
Merge pull request #5666 from Joehuu/fix-android-external-links
Browse files Browse the repository at this point in the history
Fix external links not working on Android
  • Loading branch information
bdach committed Mar 6, 2023
2 parents 32a7ef0 + bcf883e commit eac684a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions SampleGame.Android/AndroidManifest.xml
Expand Up @@ -2,4 +2,16 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="SampleGame.Android" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
<application />
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="mailto" />
</intent>
</queries>
</manifest>
12 changes: 12 additions & 0 deletions osu.Framework.Tests.Android/AndroidManifest.xml
Expand Up @@ -2,4 +2,16 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="osu.Framework.Tests.Android" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
<application android:label="osu!framework test" />
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="mailto" />
</intent>
</queries>
</manifest>
6 changes: 6 additions & 0 deletions osu.Framework.Tests/Visual/Platform/TestSceneExternalLinks.cs
Expand Up @@ -34,6 +34,12 @@ public TestSceneExternalLinks()
Text = "Open osu! site",
},
new BasicButton
{
Action = () => host.OpenUrlExternally("mailto:contact@ppy.sh"),
Size = new Vector2(150, 30),
Text = "Mail to contact email",
},
new BasicButton
{
Action = () => host.OpenUrlExternally("this is a bad link that shouldn't crash the app"),
Size = new Vector2(150, 30),
Expand Down

0 comments on commit eac684a

Please sign in to comment.