diff options
Diffstat (limited to 'build/android/app/src')
-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); + } } |