Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix external links not working on Android #5666

Merged
merged 4 commits into from Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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