将 Youtube iOS 应用中的 url 分享到我的代号 One iOS 应用
Share url from Youtube iOS app to my Codename One iOS app
我需要在 iOS 上将来自 Youtube 应用的视频 link 分享到我的代号 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();
}
但它不起作用:当我分享视频时 link,Youtube 为我提供了几个应用程序,但不是我的。
您还需要在本机代码中实现它,如果我没记错的话,我认为 xcode 项目也需要进行更改。目前我们没有对此用例的官方支持,但您可以为此提交 RFE。
我需要在 iOS 上将来自 Youtube 应用的视频 link 分享到我的代号 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();
}
但它不起作用:当我分享视频时 link,Youtube 为我提供了几个应用程序,但不是我的。
您还需要在本机代码中实现它,如果我没记错的话,我认为 xcode 项目也需要进行更改。目前我们没有对此用例的官方支持,但您可以为此提交 RFE。