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

Use SDLActivity **openURL** instead of GameActivity **openURL**. #1855

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/lime/system/System.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
Loading