我有一个使用LibGDX的安卓游戏.在其中,我有一些按钮用于在浏览器中打开URL:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://myURL/"));
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
这看起来很好......
问题是我正在尝试将游戏移植到带有RoboVM的iOS上运行,并且无法弄清楚如何设置类似的东西.
使用RoboVM绑定,我假设我可能想要使用openURL()方法:
openURL (UIApplication application, NSURL url, String sourceApplication, NSObject annotation)
Run Code Online (Sandbox Code Playgroud)
但除了NSURL之外,我不知道我需要传递其他3个参数.并且无法在线找到有关如何使用它的任何示例.