【发布时间】:2020-04-13 23:33:16
【问题描述】:
我需要将一个视频链接从 Youtube 应用程序分享到我在 iOS 上的 Codename One 应用程序。
这似乎是可能的,根据:https://stackoverflow.com/a/38036939/1277576
使用 Codename One,我尝试添加这些构建提示:
ios.plistInject=<key>CFBundleURLTypes</key><array><dict><key>CFBundleURLName</key><string>net.informaticalibera.myappname</string></dict><dict><key>CFBundleURLSchemes</key><array><string>https</string></array></dict></array>
ios.urlScheme=<string>https</string>
我将这段代码添加到了一个简单的项目中:
public void start() {
if (current != null) {
current.show();
return;
}
String url = Display.getInstance().getProperty("AppArg", null);
Form hi = new Form("Test case", BoxLayout.y());
if (url != null) {
hi.add(new SpanLabel("Intercepted URL:\n" + url));
} else {
hi.add(new Label("No URL was intercepted"));
}
hi.show();
}
但它不起作用:当我分享视频链接时,Youtube 为我提供了几个应用程序,但不是我的。
【问题讨论】:
标签: codenameone