mirror of
https://github.com/love2d/love-android.git
synced 2026-08-12 08:31:04 +02:00
Rename openURL -> openURLFromLOVE
It's probably a good idea to remove this function in 12.0 and replace it by calls to SDL_OpenURL() in LOVE C++ code instead.
This commit is contained in:
@@ -327,18 +327,9 @@ public class GameActivity extends SDLActivity {
|
||||
}
|
||||
|
||||
@Keep
|
||||
public static boolean openURL(String url) {
|
||||
public static boolean openURLFromLOVE(String url) {
|
||||
Log.d("GameActivity", "opening url = " + url);
|
||||
try {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(url));
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
context.startActivity(i);
|
||||
return true;
|
||||
} catch (RuntimeException e) {
|
||||
Log.d("GameActivity", "love.system.openURL", e);
|
||||
return false;
|
||||
}
|
||||
return openURL(url) == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user