diff --git a/src/lime/system/System.hx b/src/lime/system/System.hx index 71d1812c70..b1b22a6690 100644 --- a/src/lime/system/System.hx +++ b/src/lime/system/System.hx @@ -402,8 +402,7 @@ class System #elseif flash Lib.getURL(new URLRequest(url), target); #elseif android - var openURL = JNI.createStaticMethod("org/haxe/lime/GameActivity", "openURL", "(Ljava/lang/String;Ljava/lang/String;)V"); - openURL(url, target); + JNI.createStaticMethod("org/libsdl/app/SDLActivity", "openURL", "(Ljava/lang/String;)I")(url); #elseif (lime_cffi && !macro) NativeCFFI.lime_system_open_url(url, target); #end diff --git a/templates/android/template/app/src/main/java/org/haxe/lime/GameActivity.java b/templates/android/template/app/src/main/java/org/haxe/lime/GameActivity.java index 3c28d7a6cb..a0434580b7 100644 --- a/templates/android/template/app/src/main/java/org/haxe/lime/GameActivity.java +++ b/templates/android/template/app/src/main/java/org/haxe/lime/GameActivity.java @@ -343,24 +343,6 @@ public static void openFile (String path) { } - public static void openURL (String url, String target) { - - Intent browserIntent = new Intent (Intent.ACTION_VIEW).setData (Uri.parse (url)); - - try { - - Extension.mainActivity.startActivity (browserIntent); - - } catch (Exception e) { - - Log.e ("GameActivity", e.toString ()); - return; - - } - - } - - public static void postUICallback (final long handle) { Extension.callbackHandler.post (new Runnable () {