diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-05-17 19:09:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-17 19:09:10 +0100 |
commit | a9c3a423231e26ea3edee51d5f0bf949ca8e529b (patch) | |
tree | baac0b68f1d2daf66a140dc15d6d731eba64c9dc /build/android/app/src/main/java | |
parent | c1ce4be756e2554051a27f244303377c0a7d69a6 (diff) | |
download | minetest-a9c3a423231e26ea3edee51d5f0bf949ca8e529b.tar.gz minetest-a9c3a423231e26ea3edee51d5f0bf949ca8e529b.tar.bz2 minetest-a9c3a423231e26ea3edee51d5f0bf949ca8e529b.zip |
Add core.open_url() to main menu API (#8592)
Diffstat (limited to 'build/android/app/src/main/java')
-rw-r--r-- | build/android/app/src/main/java/net/minetest/minetest/GameActivity.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build/android/app/src/main/java/net/minetest/minetest/GameActivity.java b/build/android/app/src/main/java/net/minetest/minetest/GameActivity.java index 02b61b598..635512569 100644 --- a/build/android/app/src/main/java/net/minetest/minetest/GameActivity.java +++ b/build/android/app/src/main/java/net/minetest/minetest/GameActivity.java @@ -22,6 +22,7 @@ package net.minetest.minetest; import android.app.NativeActivity; import android.content.Intent; +import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.view.View; @@ -117,4 +118,9 @@ public class GameActivity extends NativeActivity { public int getDisplayWidth() { return getResources().getDisplayMetrics().widthPixels; } + + public void openURL(String url) { + Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); + startActivity(browserIntent); + } } |